/* Talky Walkie-Talkie Theme - Realistic Professional Design */
:root.talky-theme {
    /* Realistic Walkie-Talkie Color Palette */
    --primary-color: #1A1D21;
    --primary-dark: #0F1114;
    --secondary-color: #FFA500;
    --accent-color: #00FF41;
    --speaker-color: #2D3135;
    --background: linear-gradient(135deg, #1A1D21 0%, #2D3135 50%, #1A1D21 100%);
    --surface: #252832;
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0A0;
    --danger: #FF4444;
    --success: #00FF41;
    --border-radius: 8px;
    --shadow: 0 6px 20px rgba(0,0,0,0.6);
    --shadow-elevated: 0 12px 40px rgba(0,0,0,0.8);
    --incoming-call-color: #00FF41;
    
    /* Professional Walkie-Talkie Gradients */
    --metallic-gradient: linear-gradient(145deg, #3A3F47 0%, #2D3135 25%, #1A1D21 50%, #2D3135 75%, #3A3F47 100%);
    --button-gradient: linear-gradient(145deg, #4A4F57 0%, #2D3135 100%);
    --ptt-gradient: linear-gradient(145deg, #FFA500 0%, #FF8C00 50%, #FF7700 100%);
    --ptt-pressed-gradient: linear-gradient(145deg, #00FF41 0%, #00DD35 50%, #00BB29 100%);
    --antenna-gradient: linear-gradient(180deg, #606468 0%, #3A3F47 100%);
    --display-gradient: linear-gradient(145deg, #0D1117 0%, #1A1D21 100%);
    
    /* Texture and Depth Variables */
    --plastic-texture: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 1px,
        rgba(255,255,255,0.02) 1px,
        rgba(255,255,255,0.02) 2px
    );
    --metal-texture: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 0.5px,
        rgba(255,255,255,0.05) 0.5px,
        rgba(255,255,255,0.05) 1px
    );
    --grip-texture: repeating-conic-gradient(
        from 0deg,
        transparent 0deg 5deg,
        rgba(255,255,255,0.08) 5deg 10deg
    );
}

/* Walkie-Talkie Body Structure */
body.talky-theme {
    font-family: 'Orbitron', 'Roboto Mono', monospace;
    background: var(--background);
    color: var(--text-primary);
    overflow: hidden;
}

/* Main Walkie-Talkie Housing */
#mainScreen.talky-theme {
    background: var(--metallic-gradient);
    border-radius: 25px 25px 15px 15px;
    margin: 8px;
    box-shadow: 
        inset 0 0 30px rgba(0,0,0,0.5),
        0 0 50px rgba(0,0,0,0.9),
        0 15px 60px rgba(0,0,0,0.7);
    border: 4px solid var(--primary-dark);
    position: relative;
    overflow: hidden;
}

/* Realistic Antenna */
#mainScreen.talky-theme::before {
    content: '';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 40px;
    background: var(--antenna-gradient);
    border-radius: 4px 4px 0 0;
    z-index: 1000;
    box-shadow: 
        inset 0 2px 4px rgba(255,255,255,0.2),
        0 0 10px rgba(0,0,0,0.8);
    border: 1px solid var(--primary-dark);
}

/* Speaker Grille Enhancement */
#mainScreen.talky-theme::after {
    content: '';
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 30px;
    background: repeating-linear-gradient(
        90deg,
        var(--speaker-color),
        var(--speaker-color) 3px,
        var(--primary-dark) 3px,
        var(--primary-dark) 6px
    );
    border-radius: 15px;
    z-index: 1000;
    box-shadow: 
        inset 0 3px 8px rgba(0,0,0,0.8),
        0 2px 4px rgba(0,0,0,0.5);
    border: 2px solid var(--primary-dark);
}

/* Side Clip and Details */
.talky-theme .side-clip {
    position: absolute;
    right: -8px;
    top: 25%;
    width: 20px;
    height: 45%;
    background: var(--metallic-gradient);
    border-radius: 0 12px 12px 0;
    box-shadow: 
        inset -3px 0 6px rgba(0,0,0,0.4),
        0 0 10px rgba(0,0,0,0.6);
    z-index: 1001;
    border: 2px solid var(--primary-dark);
    border-left: none;
}

.talky-theme .side-clip::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 6px;
    width: 8px;
    height: 60%;
    background: var(--button-gradient);
    border-radius: 4px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

/* Professional LCD Display Header */
.talky-theme .app-header {
    background: var(--display-gradient);
    color: var(--text-primary);
    padding: 35px 20px 20px;
    box-shadow: 
        var(--shadow),
        inset 0 0 20px rgba(0,0,0,0.6);
    border-bottom: 3px solid var(--primary-dark);
    position: relative;
    border-radius: 0 0 15px 15px;
    margin: 0 5px;
}

.talky-theme .app-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: var(--plastic-texture);
    pointer-events: none;
}

/* Enhanced LCD Display Effect */
.talky-theme .header-left h1 {
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-color);
    text-shadow: 
        0 0 10px var(--accent-color),
        0 0 20px var(--accent-color),
        0 0 30px var(--accent-color);
    letter-spacing: 3px;
    background: rgba(0,0,0,0.8);
    padding: 12px 20px;
    border-radius: 8px;
    border: 2px solid var(--accent-color);
    position: relative;
    overflow: hidden;
}

.talky-theme .header-left h1::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,255,65,0.2), transparent);
    animation: scan 3s infinite;
}

@keyframes scan {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Professional Status Indicators */
.talky-theme .connection-status {
    background: rgba(0,0,0,0.6);
    border: 1px solid var(--accent-color);
    border-radius: 20px;
    padding: 6px 12px;
    font-family: 'Orbitron', monospace;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.talky-theme .connection-status.online {
    color: var(--accent-color);
    box-shadow: 0 0 10px rgba(0,255,65,0.3);
}

.talky-theme .connection-status.offline {
    color: var(--danger);
    border-color: var(--danger);
    box-shadow: 0 0 10px rgba(255,68,68,0.3);
}

/* Professional PTT Button */
.talky-theme .ptt-button {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: var(--ptt-gradient);
    color: var(--primary-dark);
    border: 8px solid var(--primary-dark);
    box-shadow: 
        0 0 40px rgba(255, 165, 0, 0.5),
        inset 0 0 30px rgba(255,255,255,0.15),
        0 15px 50px rgba(0,0,0,0.8);
    position: relative;
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 20px;
}

/* PTT Button Professional Grip Texture */
.talky-theme .ptt-button::before {
    content: '';
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    border-radius: 50%;
    border: 3px solid var(--secondary-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.talky-theme .ptt-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    height: 85%;
    border-radius: 50%;
    background: var(--grip-texture);
    pointer-events: none;
    opacity: 0.3;
}

/* PTT Button Active State */
.talky-theme .ptt-button:active,
.talky-theme .ptt-button.recording {
    background: var(--ptt-pressed-gradient);
    transform: scale(1.08);
    box-shadow: 
        0 0 60px rgba(0, 255, 65, 0.8),
        inset 0 0 40px rgba(255,255,255,0.25),
        0 8px 30px rgba(0,0,0,0.9);
    color: var(--primary-dark);
    text-shadow: 0 0 10px rgba(0,0,0,0.8);
}

.talky-theme .ptt-button:active::before,
.talky-theme .ptt-button.recording::before {
    opacity: 1;
    animation: ptt-pulse 1.5s infinite;
}

@keyframes ptt-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

/* Professional Control Panel */
.talky-theme .bottom-nav {
    background: var(--metallic-gradient);
    box-shadow: 
        0 -6px 20px rgba(0,0,0,0.5),
        inset 0 3px 8px rgba(255,255,255,0.08);
    border-radius: 20px 20px 0 0;
    border: 3px solid var(--primary-dark);
    border-bottom: none;
    margin: 0 5px;
    position: relative;
}

.talky-theme .bottom-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: var(--metal-texture);
    pointer-events: none;
    border-radius: inherit;
}

/* Professional Control Knobs */
.talky-theme .control-knob-left,
.talky-theme .control-knob-right {
    position: absolute;
    top: 50%;
    width: 35px;
    height: 35px;
    background: var(--button-gradient);
    border-radius: 50%;
    box-shadow: 
        inset 0 3px 8px rgba(0,0,0,0.6),
        0 0 10px rgba(0,0,0,0.4);
    border: 3px solid var(--primary-dark);
    transform: translateY(-50%);
}

.talky-theme .control-knob-left {
    left: 25px;
}

.talky-theme .control-knob-right {
    right: 25px;
}

.talky-theme .control-knob-left::after,
.talky-theme .control-knob-right::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 3px;
    height: 15px;
    background: var(--text-primary);
    border-radius: 2px;
    box-shadow: 0 0 5px rgba(255,255,255,0.8);
}

/* Professional Navigation Items */
.talky-theme .nav-item {
    background: none;
    border: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    border-radius: 12px;
    margin: 8px 4px;
    position: relative;
    backdrop-filter: blur(10px);
}

.talky-theme .nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: var(--accent-color);
    text-shadow: 0 0 8px var(--accent-color);
    box-shadow: inset 0 0 20px rgba(0,255,65,0.1);
}

.talky-theme .nav-item.active {
    color: var(--accent-color);
    background: rgba(0,255,65,0.1);
    box-shadow: 
        inset 0 0 20px rgba(0,255,65,0.2),
        0 0 15px rgba(0,255,65,0.3);
    text-shadow: 0 0 10px var(--accent-color);
}

/* Professional Content Area */
.talky-theme .content {
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    margin: 15px;
    box-shadow: 
        inset 0 3px 15px rgba(0,0,0,0.5),
        0 0 20px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
}

.talky-theme .content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: var(--plastic-texture);
    pointer-events: none;
    border-radius: inherit;
    opacity: 0.3;
}

/* Professional Recipient Selector */
.talky-theme .recipient-selector {
    background: var(--metallic-gradient);
    border: 3px solid var(--primary-dark);
    border-radius: 12px;
    box-shadow: 
        var(--shadow-elevated),
        inset 0 0 20px rgba(255,255,255,0.05);
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.talky-theme .recipient-selector::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: var(--metal-texture);
    pointer-events: none;
}

.talky-theme .recipient-selector:hover {
    border-color: var(--accent-color);
    box-shadow: 
        var(--shadow-elevated),
        0 0 20px rgba(0,255,65,0.3);
}

/* Professional Buttons */
.talky-theme .btn-primary {
    background: var(--button-gradient);
    color: var(--text-primary);
    border: 2px solid var(--primary-dark);
    box-shadow: var(--shadow);
    font-family: 'Orbitron', monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    position: relative;
    overflow: hidden;
}

.talky-theme .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: var(--metal-texture);
    pointer-events: none;
}

.talky-theme .btn-primary:hover {
    border-color: var(--accent-color);
    box-shadow: 
        var(--shadow-elevated),
        0 0 15px rgba(0,255,65,0.4);
    color: var(--accent-color);
    text-shadow: 0 0 8px var(--accent-color);
}

/* Professional Message History */
.talky-theme .message-item {
    background: var(--metallic-gradient);
    border: 2px solid var(--primary-dark);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    color: var(--text-primary);
    position: relative;
}

.talky-theme .message-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: var(--plastic-texture);
    pointer-events: none;
    border-radius: inherit;
    opacity: 0.3;
}

/* Professional Contact Items */
.talky-theme .contact-item,
.talky-theme .group-item {
    background: var(--metallic-gradient);
    border: 2px solid var(--primary-dark);
    color: var(--text-primary);
    box-shadow: var(--shadow-elevated);
    position: relative;
    overflow: hidden;
}

.talky-theme .contact-item::before,
.talky-theme .group-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: var(--plastic-texture);
    pointer-events: none;
    opacity: 0.2;
}

.talky-theme .contact-item:hover,
.talky-theme .group-item:hover {
    border-color: var(--accent-color);
    box-shadow: 
        var(--shadow-elevated),
        0 0 20px rgba(0,255,65,0.3);
    color: var(--accent-color);
}

/* Professional Modal Styling */
.talky-theme .modal-content {
    background: var(--metallic-gradient);
    border: 4px solid var(--primary-dark);
    box-shadow: var(--shadow-elevated);
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.talky-theme .modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: var(--plastic-texture);
    pointer-events: none;
    opacity: 0.3;
}

/* Professional Scrollbars */
.talky-theme ::-webkit-scrollbar {
    width: 14px;
}

.talky-theme ::-webkit-scrollbar-track {
    background: var(--primary-dark);
    border-radius: 12px;
    border: 2px solid var(--primary-color);
}

.talky-theme ::-webkit-scrollbar-thumb {
    background: var(--metallic-gradient);
    border-radius: 12px;
    border: 2px solid var(--primary-dark);
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.5);
}

.talky-theme ::-webkit-scrollbar-thumb:hover {
    background: var(--button-gradient);
    box-shadow: 
        inset 0 2px 6px rgba(0,0,0,0.5),
        0 0 10px rgba(0,255,65,0.3);
}

/* Professional Loading States */
.talky-theme .spinner {
    border: 4px solid var(--primary-dark);
    border-top: 4px solid var(--accent-color);
    box-shadow: 0 0 20px rgba(0,255,65,0.5);
}

/* Professional Input Fields */
.talky-theme input[type="text"],
.talky-theme input[type="email"],
.talky-theme input[type="password"] {
    background: var(--surface);
    color: var(--text-primary);
    border: 2px solid var(--primary-dark);
    font-family: 'Orbitron', monospace;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.5);
}

.talky-theme input[type="text"]:focus,
.talky-theme input[type="email"]:focus,
.talky-theme input[type="password"]:focus {
    border-color: var(--accent-color);
    box-shadow: 
        inset 0 2px 8px rgba(0,0,0,0.5),
        0 0 15px rgba(0,255,65,0.4);
    color: var(--accent-color);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .talky-theme #mainScreen {
        margin: 0;
        border-radius: 0;
        border: none;
    }
    
    .talky-theme #mainScreen::before {
        display: none; /* Hide antenna on mobile */
    }
    
    .talky-theme .ptt-button {
        width: 200px;
        height: 200px;
        font-size: 18px;
    }
    
    .talky-theme .control-knob-left,
    .talky-theme .control-knob-right {
        width: 25px;
        height: 25px;
    }
    
    .talky-theme .control-knob-left {
        left: 15px;
    }
    
    .talky-theme .control-knob-right {
        right: 15px;
    }
}

@media (min-width: 1024px) {
    .talky-theme .ptt-button {
        width: 300px;
        height: 300px;
        font-size: 24px;
    }
    
    .talky-theme #mainScreen {
        max-width: 900px;
        margin: 20px auto;
        box-shadow: 
            0 0 80px rgba(0,0,0,0.9),
            inset 0 0 40px rgba(0,0,0,0.4);
    }
}

/* Professional Error States */
.talky-theme .error {
    background: rgba(255, 68, 68, 0.1);
    border: 2px solid var(--danger);
    color: var(--danger);
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.3);
}

/* Professional Success States */
.talky-theme .success {
    background: rgba(0, 255, 65, 0.1);
    border: 2px solid var(--success);
    color: var(--success);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
}

/* Theme Selector Styles */
.theme-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 2px solid var(--primary-dark);
    border-radius: 12px;
    background: var(--metallic-gradient);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 120px;
    gap: 10px;
}

.theme-option:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
    transform: translateY(-2px);
}

.theme-option.active {
    border-color: var(--accent-color);
    background: linear-gradient(145deg, var(--accent-color) 0%, var(--secondary-color) 100%);
    color: var(--primary-dark);
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.5);
}

.theme-preview {
    width: 60px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid var(--primary-dark);
    background: var(--button-gradient);
    position: relative;
    overflow: hidden;
}

.theme-preview.talky-theme {
    background: var(--ptt-gradient);
    border-color: var(--accent-color);
}

.theme-preview::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 4px;
    background: var(--speaker-color);
    border-radius: 2px;
}

.theme-preview.talky-theme::after {
    background: repeating-linear-gradient(
        90deg,
        var(--speaker-color),
        var(--speaker-color) 2px,
        var(--primary-dark) 2px,
        var(--primary-dark) 3px
    );
}

/* Theme switcher button styles */
#theme-switcher {
    font-size: 16px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.talky-theme #theme-switcher {
    background: var(--metallic-gradient);
    border: 2px solid var(--primary-dark);
    color: var(--text-primary);
    box-shadow: var(--shadow);
}

.talky-theme #theme-switcher:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.4);
    text-shadow: 0 0 8px var(--accent-color);
}