/* UUID Tool Variables */
:root {
    /* Monokai Theme Colors */
    --monokai-bg: #272822; /* Fallback */
    --monokai-fg: #f8f8f2;
    --monokai-comment: #75715e;
    --monokai-yellow: #e6db74;
    --monokai-purple: #ae81ff;
    --monokai-red: #f92672;
    --monokai-blue: #66d9ef;
    --monokai-green: #a6e22e;
    --monokai-orange: #fd971f;

    /* Liquid Glass Variables */
    --glass-bg: linear-gradient(135deg, rgba(45, 45, 45, 0.5) 0%, rgba(30, 30, 30, 0.4) 50%, rgba(45, 45, 45, 0.5) 100%);
    --glass-bg-solid: rgba(30, 30, 30, 0.4);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-border-top: rgba(255, 255, 255, 0.25);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    --glass-blur: blur(20px) saturate(200%);
    --glass-glow: 0 0 40px rgba(102, 217, 239, 0.08);
}

/* Hide Global Navigation for this tool */
header.navbar-fixed,
#headNav,
#aplayer,
.aplayer {
    display: none !important;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #1a1a1a;
    color: var(--monokai-fg);
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
    overflow-x: hidden;
    position: relative;
}

/* Background image layer with blur */
.bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(12px);
    transform: scale(1.05); /* Prevent blur edge artifacts */
}

/* Dark overlay for better contrast */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: rgba(0, 0, 0, 0.5);
}

.uuid-tool-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    min-height: 100vh;
    box-sizing: border-box;
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

/* Liquid Glass Panel */
.glass-panel {
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-border-top);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--glass-shadow), var(--glass-glow);
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-sizing: border-box;
    position: relative;
}

/* Liquid glass shine effect */
.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 30%, 
        rgba(255, 255, 255, 0.4) 50%, 
        rgba(255, 255, 255, 0.3) 70%, 
        transparent 100%);
    pointer-events: none;
}

/* Inner glow effect */
.glass-panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
    pointer-events: none;
    border-radius: 20px;
    z-index: 0;
}

/* Ensure content is above pseudo-elements */
.glass-panel > * {
    position: relative;
    z-index: 1;
}

/* Specific Panel Styles */
.result-section {
    order: 1; /* Top position */
}

.controls-section {
    order: 2; /* Bottom position */
}

.small-panel {
    max-width: 600px;
    padding: 24px;
}

.tool-title {
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    text-align: center;
    color: var(--monokai-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* Result Grid */
.result-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 10px;
}

.result-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-label {
    font-size: 0.85rem;
    color: var(--monokai-comment);
    margin-left: 4px;
}

.result-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.result-input-group input {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--monokai-yellow);
    padding: 12px 16px;
    border-radius: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s ease;
    width: 100%;
}

.result-input-group input:focus {
    border-color: var(--monokai-blue);
    box-shadow: 0 0 0 2px rgba(102, 217, 239, 0.2);
}

.copy-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--monokai-fg);
    width: 46px;
    height: 46px; /* Match input height roughly */
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--monokai-green);
    border-color: rgba(166, 226, 46, 0.3);
}

.copy-btn:active {
    transform: scale(0.95);
}

/* Controls */
.control-row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.control-group label {
    font-size: 0.9rem;
    color: var(--monokai-green);
    font-weight: 500;
}

/* Inputs & Selects */
input, select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--monokai-fg);
    padding: 12px 16px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    border-color: var(--monokai-blue);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(102, 217, 239, 0.2);
}

.select-wrapper {
    position: relative;
    width: 100%;
}

.select-wrapper i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--monokai-comment);
    pointer-events: none;
    z-index: 1; /* Ensure icon is below select if needed, but select needs higher z-index to be clickable */
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.3) !important;
    /* Override Materialize CSS */
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
    pointer-events: auto !important;
}

/* Additional Params for v3/v5 */
.version-params {
    background: rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    margin-top: 20px;
}

.version-params.hidden {
    display: none;
}

.sub-group {
    margin-bottom: 12px;
}

.sub-group:last-child {
    margin-bottom: 0;
}

/* Generate Button */
.generate-btn {
    background: linear-gradient(135deg, var(--monokai-red), #d61c60);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 46px; /* Match input height */
    box-shadow: 0 4px 15px rgba(249, 38, 114, 0.4);
    min-width: 140px;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 38, 114, 0.5);
}

.generate-btn:active {
    transform: translateY(1px);
}


/* Toast - Top positioned, smaller */
.toast {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(-60px);
    background: rgba(35, 35, 35, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--monokai-fg);
    padding: 6px 16px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    font-weight: 400;
    font-size: 0.75rem;
    pointer-events: none;
    max-width: 280px;
    text-align: center;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.error {
    border-color: rgba(249, 38, 114, 0.4);
    color: var(--monokai-red);
}

.toast.success {
    border-color: rgba(166, 226, 46, 0.4);
    color: var(--monokai-green);
}

/* Responsive */
@media (max-width: 600px) {
    .glass-panel {
        padding: 20px;
    }
    
    .control-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .generate-btn {
        width: 100%;
    }
}
