:root {
    --bg-color: #000000;
    --surface: #0a0a0a;
    --glass: rgba(18, 18, 20, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
    --primary: #007aff;
    --primary-glow: rgba(0, 122, 255, 0.3);
    --success: #34c759;
    --warning: #ffb340;
    --error: #ff453a;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.5);
    --sidebar-width: 240px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Custom Scrollbar - Narrow & Dark */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* Layout System */
#app-layout {
    display: flex;
    min-height: 100vh;
    width: 100vw;
    overflow-x: hidden;
}

#main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-color);
    margin-left: var(--sidebar-width);
    /* Adjust for fixed sidebar */
}

@media (max-width: 1024px) {
    #main-wrapper {
        margin-left: 0;
    }
}

#main-content {
    flex: 1;
    padding: 0 0 100px 0;
    /* Space for bottom nav on mobile */
}

@media (min-width: 1025px) {
    #main-content {
        padding: 60px 40px;
        /* More padding for desktop */
    }
}

/* Sidebar (Desktop Only) */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: #08080a;
    border-right: 1px solid var(--glass-border);
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
    scrollbar-width: none;
    /* Firefox */
}

.sidebar::-webkit-scrollbar {
    display: none;
    /* Hide sidebar scrollbar for cleaner look */
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
    /* Reduced margin to move links up */
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.sidebar-item.active {
    background: linear-gradient(90deg, rgba(0, 122, 255, 0.15) 0%, rgba(0, 122, 255, 0.05) 100%);
    color: var(--primary);
    border-left: 3px solid var(--primary);
    padding-left: 13px;
    /* Compensate for border */
}

.sidebar-item i {
    width: 20px;
    height: 20px;
    transition: transform 0.2s;
}

.sidebar-item:hover i {
    transform: scale(1.1);
}

/* Mobile Header (Hidden on Desktop) */
.mobile-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 900;
}

@media (min-width: 1025px) {
    .mobile-top-bar {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        display: none !important;
    }
}

/* Home Grid (2 Columns for Desktop) */
.home-menu-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
}

@media (min-width: 768px) {
    .home-menu-wrapper {
        grid-template-columns: 1fr 1fr;
    }
}

.list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-decoration: none;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.list-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.list-item:active {
    transform: scale(0.97);
}

.item-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.item-content {
    flex: 1;
}

.item-content h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.item-content p {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* Exams Page Redesign - Modern Glass Grid */
.exams-section-label {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-secondary);
    margin-bottom: 24px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.exam-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.exam-box-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    text-align: center;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
}

.exam-box-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.exam-box-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.exam-box-card:hover::before {
    opacity: 1;
}

.exam-box-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px currentColor);
}

.exam-box-title {
    font-size: 1.1rem;
    font-weight: 950;
    margin-bottom: 10px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.exam-box-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 24px;
    min-height: 3em;
}

.exam-box-chevron {
    margin-top: auto;
    opacity: 0.4;
    transition: all 0.3s;
}

.exam-box-card:hover .exam-box-chevron {
    opacity: 1;
    transform: translateX(4px);
}

/* Category Specific Glows */
.box-isletme {
    border-bottom: 3px solid rgba(0, 122, 255, 0.3);
}

.box-isletme .exam-box-icon {
    color: #007aff;
}

.box-teknik {
    border-bottom: 3px solid rgba(142, 45, 226, 0.3);
}

.box-teknik .exam-box-icon {
    color: #8e2de2;
}

.box-yonetmelik {
    border-bottom: 3px solid rgba(242, 153, 74, 0.3);
}

.box-yonetmelik .exam-box-icon {
    color: #f2994a;
}

.box-deneme {
    border-bottom: 3px solid rgba(235, 87, 87, 0.3);
}

.box-deneme .exam-box-icon {
    color: #eb5757;
}

.exam-info-alert {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 24px;
    background: rgba(242, 201, 76, 0.05);
    border: 1px solid rgba(242, 201, 76, 0.1);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.exam-info-alert span {
    color: #f2c94c;
    font-weight: 900;
}

@media (max-width: 1024px) {
    .exam-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .exam-grid-container {
        grid-template-columns: 1fr;
    }
}

.exam-info-alert span {
    color: #f59e0b;
    /* Warning yellow */
    font-weight: 900;
    text-transform: uppercase;
}

@media (max-width: 1024px) {
    .exam-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .exam-grid-container {
        grid-template-columns: 1fr;
    }
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

@media (min-width: 1025px) {
    .bottom-nav {
        display: none !important;
    }
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
}

.nav-link.active {
    color: var(--primary);
}

/* UI Elements */
.container {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 7px;
    height: 7px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Morse Page Styles */
.morse-page {
    padding-bottom: 40px;
}

.page-header {
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.training-btn {
    background: linear-gradient(135deg, var(--primary) 0%, #0051ff 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: all 0.2s;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
}

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

.morse-category {
    margin-bottom: 40px;
}

.morse-category h3 {
    font-size: 0.9rem;
    margin-bottom: 20px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 800;
}

.morse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    gap: 14px;
}

.morse-card {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(135deg, #007aff 0%, #0051ff 100%);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
    border: none;
    transition: transform 0.2s, background 0.2s;
    position: relative;
    overflow: hidden;
    color: white;
    cursor: pointer;
}

.morse-card:active {
    transform: scale(0.94);
    background: linear-gradient(135deg, #0051ff 0%, #0041cc 100%);
}

.morse-char {
    font-size: 1.6rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.morse-code {
    font-family: 'Inter', monospace;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    opacity: 0.9;
}

.play-hint {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0.5;
}

/* Interactive Keyer */
.interactive-keyer {
    padding: 24px;
    border-radius: 24px;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.keyer-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.keyer-pad {
    width: 100%;
    height: 120px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--primary);
    border-radius: 18px;
    color: var(--primary);
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    cursor: pointer;
}

.keyer-pad:active,
.keyer-pad.active {
    background: var(--primary);
    color: white;
    transform: scale(0.98);
    box-shadow: 0 0 30px var(--primary-glow);
}

.keyer-controls {
    display: flex;
    justify-content: flex-end;
}

.keyer-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.2s;
    cursor: pointer;
}

.keyer-clear-btn:active {
    transform: scale(0.96);
}

.keyer-output {
    min-height: 52px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-secondary);
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 12px 18px;
    word-break: break-all;
}

/* Logbook Specific Styles */
.logbook-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 40px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-size: 0.85rem;
}

.action-btn.primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.action-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 8px;
}

.stat-card {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-icon {
    color: var(--primary);
    opacity: 0.8;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Modal and Form */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.log-form {
    width: 100%;
    max-width: 550px;
    padding: 32px;
    border-radius: 24px;
    background: #0f0f12;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.form-header h3 {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
}

/* Table */
.log-table-wrapper {
    overflow-x: auto;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    text-align: left;
}

.log-table th {
    padding: 16px 20px;
    color: var(--text-secondary);
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.log-row {
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.log-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.log-table td {
    padding: 16px 20px;
    vertical-align: middle;
}

.callsign-col {
    color: var(--primary);
    font-family: monospace;
    font-weight: 900;
    font-size: 1.1rem;
}

.mode-badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.05);
    text-transform: uppercase;
}

.mode-badge.dmr {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.mode-badge.nxdn {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.mode-badge.fm {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

/* Fade Up Animation */
.fade-up {
    animation: fadeUp 0.3s ease-out;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Morse Training Styles */
.training-stats-bar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-item {
    flex: 1;
    padding: 16px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
}

.difficulty-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px;
    border-radius: 16px;
    width: 100%;
    margin-bottom: 24px;
    gap: 6px;
}

.tab {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    background: transparent;
}

.tab.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.training-card {
    padding: 40px 32px;
    border-radius: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.target-word {
    font-size: 3.5rem;
    font-weight: 950;
    letter-spacing: -2px;
    color: #fff;
    text-transform: uppercase;
    line-height: 1;
}

.target-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    margin-top: 8px;
}

.morse-input-display {
    width: 100%;
    min-height: 70px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    font-family: monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    letter-spacing: 2px;
}

.decoded-preview {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.big-keyer-pad {
    width: 100%;
    height: 140px;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid var(--primary);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.1s;
    user-select: none;
    cursor: pointer;
}

.big-keyer-pad:active,
.big-keyer-pad.active {
    background: var(--primary);
    transform: scale(0.98);
    box-shadow: 0 0 30px var(--primary-glow);
}

.key-icon {
    width: 32px;
    height: 32px;
    color: var(--primary);
    transition: color 0.1s;
}

.big-keyer-pad:active .key-icon,
.big-keyer-pad.active .key-icon {
    color: white;
}

.big-keyer-pad span {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.big-keyer-pad:active span,
.big-keyer-pad.active span {
    color: rgba(255, 255, 255, 0.8);
}

.training-controls {
    display: flex;
    gap: 12px;
    width: 100%;
}

.control-btn {
    flex: 1;
    padding: 14px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.control-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.control-btn.secondary:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.08);
}

.info-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 16px;
    background: rgba(0, 122, 255, 0.05);
    border: 1px solid rgba(0, 122, 255, 0.1);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

@keyframes flashCorrect {
    0% {
        background: rgba(255, 255, 255, 0.03);
    }

    50% {
        background: rgba(48, 209, 88, 0.15);
        border-color: rgba(48, 209, 88, 0.3);
    }

    100% {
        background: rgba(255, 255, 255, 0.03);
    }
}

.training-card.correct {
    animation: flashCorrect 0.6s ease;
}

@keyframes flashError {
    0% {
        background: rgba(255, 255, 255, 0.03);
    }

    50% {
        background: rgba(255, 69, 58, 0.15);
        border-color: rgba(255, 69, 58, 0.3);
    }

    100% {
        background: rgba(255, 255, 255, 0.03);
    }
}

/* Q-Codes Styles */
.qcodes-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 40px;
}

.search-bar {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-radius: 20px;
    gap: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.search-bar:focus-within {
    border-color: rgba(0, 122, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 20px rgba(0, 122, 255, 0.1);
}

.search-bar input {
    background: none;
    border: none;
    color: var(--text-primary);
    flex: 1;
    font-size: 1.05rem;
    font-weight: 500;
    outline: none;
}

.search-bar input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.search-icon {
    color: var(--text-secondary);
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

.qcodes-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.qcode-item {
    padding: 20px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.qcode-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.qcode-header {
    display: flex;
    align-items: center;
}

.qcode-label {
    font-family: 'Inter', monospace;
    font-weight: 900;
    color: var(--primary);
    font-size: 1.2rem;
    letter-spacing: 0.5px;
}

.qcode-meaning {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
    font-weight: 500;
}

.no-results {
    text-align: center;
    padding: 60px 40px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 24px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.keyer-decoded {
    min-height: 48px;
    border: 1px solid rgba(0, 122, 255, 0.1);
    border-radius: 14px;
    background: rgba(0, 122, 255, 0.05);
    color: var(--primary);
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    padding: 12px 18px;
    word-break: break-all;
}

/* Exam Guide - Premium Glassmorphism Overhaul */
.exam-guide-page {
    padding: 20px;
    padding-bottom: 120px;
    max-width: 900px;
    margin: 0 auto;
}

.guide-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.guide-section {
    padding: 32px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: all 0.3s ease;
}

.guide-section:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.guide-section h3 {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.5px;
}

.guide-section h3 i {
    color: var(--primary);
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.guide-content {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    font-weight: 500;
}

.tip-box {
    background: rgba(48, 209, 88, 0.06);
    border: 1px solid rgba(48, 209, 88, 0.15);
    padding: 20px;
    border-radius: 20px;
    margin-top: 8px;
}

.tip-box h4 {
    margin: 0 0 10px 0;
    color: #30D158;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 800;
}

.tip-box p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(48, 209, 88, 0.85);
}

.step-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.step-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.step-number {
    background: var(--primary);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.step-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.step-text strong {
    color: #fff;
    font-weight: 700;
}

.price-table-container {
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.price-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.price-table th {
    padding: 16px;
    text-align: left;
    color: var(--primary);
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.price-table td {
    padding: 16px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.price-table tr:last-child td {
    border-bottom: none;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.info-card.glass {
    padding: 24px;
    border-radius: 24px;
    text-align: center;
    transition: transform 0.3s;
}

.info-card.glass:hover {
    transform: translateY(-5px);
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 800;
    margin-top: 12px;
}

.badge-a {
    background: rgba(0, 122, 255, 0.15);
    color: #007AFF;
    border: 1px solid rgba(0, 122, 255, 0.2);
}

.badge-b {
    background: rgba(88, 86, 214, 0.15);
    color: #5856D6;
    border: 1px solid rgba(88, 86, 214, 0.2);
}

.links-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guide-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
}

.guide-link:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--primary);
    transform: translateX(8px);
}

.notice-text {
    font-size: 0.85rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 5px;
}

@media (max-width: 768px) {
    .info-cards {
        grid-template-columns: 1fr;
    }

    .guide-section {
        padding: 24px;
    }
}

.cevrim-page {
    padding-bottom: 24px;
}

.setup-card {
    padding: 24px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.setup-card h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--primary);
}

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

.form-group label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.required-mark {
    color: #ff8d87;
    margin-left: 2px;
}

.form-group input {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    color: white;
    font-size: 1rem;
}

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

.planner-group label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.planner-group input {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    color: white;
    font-size: 1rem;
}

.form-group input[aria-invalid='true'] {
    border-color: rgba(255, 59, 48, 0.7);
}

.form-hint-error {
    margin: 0;
    color: #ff8d87;
    font-size: 0.78rem;
    font-weight: 600;
}

.planner-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.plan-btn,
.plan-cancel-btn {
    border-radius: 10px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 700;
}

.plan-btn {
    background: var(--surface);
    color: var(--primary);
}

.plan-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.plan-cancel-btn {
    background: transparent;
    color: var(--text-secondary);
}

.plan-info {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.plan-hint {
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.plan-error {
    margin: 0;
    font-size: 0.78rem;
    color: #ff8d87;
    font-weight: 600;
}

.start-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
}

.start-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.active-session {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.session-stats {
    padding: 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat .label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.stat .value {
    font-weight: 700;
    color: var(--primary);
}

.stat .value.value-small {
    font-size: 0.86rem;
    color: var(--text-primary);
}

.stat.stat-start-time {
    min-width: 180px;
}

.stop-btn {
    background: #ff3b30;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stop-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.quick-entry {
    padding: 12px;
    border-radius: 12px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.quick-entry input {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px;
    color: white;
    font-size: 0.9rem;
    flex: 1;
    min-width: 100px;
    text-transform: uppercase;
}

.add-p-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    height: 40px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.participant-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
}

.participant-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.participant-table th {
    text-align: left;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
}

.participant-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.participant-table .call {
    font-weight: 700;
    color: var(--primary);
    font-family: var(--font-mono);
}

.participant-table .empty-row {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-style: italic;
}

.session-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1 1 120px;
    background: var(--surface);
    color: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
}

.action-btn.primary {
    background: var(--primary);
    border-color: var(--primary);
}

.history-section {
    margin-top: 24px;
    padding: 18px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.history-header>div:first-child {
    min-width: 0;
    flex: 1 1 320px;
}

.history-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    flex: 1 1 360px;
    justify-content: flex-end;
}

.history-filters {
    display: grid;
    grid-template-columns: minmax(0, 220px) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 170px);
    gap: 8px;
}

.history-filter-input,
.history-filter-select {
    height: 40px;
    width: 100%;
    min-width: 0;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-primary);
    font-size: 0.85rem;
    padding: 0 12px;
}

.history-filter-input::placeholder {
    color: var(--text-secondary);
}

.history-header h3 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    color: var(--primary);
}

.history-header p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.history-selection-hint {
    margin-top: 4px !important;
    font-size: 0.75rem !important;
}

.history-clear-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-clear-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hidden-file-input {
    display: none;
}

.history-state {
    margin: 0;
    padding: 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.history-state.error {
    color: #ff8d87;
    background: rgba(255, 59, 48, 0.08);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(0, 122, 255, 0.25);
}

.history-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.history-item-meta {
    min-width: 0;
    flex: 1 1 260px;
}

.history-item-meta h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    color: white;
}

.history-item-meta p {
    margin: 0 0 4px 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
    overflow-wrap: anywhere;
}

.history-badge {
    display: inline-block;
    margin-top: 2px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(0, 122, 255, 0.2);
    color: var(--primary);
}

.history-item-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.history-toggle-btn,
.history-delete-btn,
.history-select-btn {
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0 10px;
}

.history-delete-btn {
    width: 34px;
    padding: 0;
    color: #ff8d87;
}

.history-select-btn.active {
    border-color: var(--primary);
    color: var(--primary);
}

.history-details {
    border-top: 1px solid var(--border);
    padding-top: 10px;
}

.history-empty {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.history-table th {
    text-align: left;
    padding: 8px;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}

.history-table td {
    padding: 8px;
    border-bottom: 1px solid var(--border);
}

@media (max-width: 860px) {
    .history-filters {
        grid-template-columns: 1fr;
    }

    .history-header {
        flex-direction: column;
    }

    .history-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .history-item-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 1200px) {
    .history-header {
        flex-direction: column;
    }

    .history-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .history-filters {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
}

.confirm-modal {
    width: 100%;
    max-width: 360px;
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.confirm-modal h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.confirm-modal p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.confirm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
}

.confirm-cancel-btn,
.confirm-stop-btn {
    border-radius: 10px;
    border: 1px solid var(--border);
    height: 36px;
    padding: 0 14px;
    font-size: 0.82rem;
    font-weight: 700;
}

.confirm-cancel-btn {
    background: var(--surface);
    color: var(--text-primary);
}

.confirm-stop-btn {
    background: #ff3b30;
    color: white;
    border-color: #ff3b30;
}

.confirm-cancel-btn:disabled,
.confirm-stop-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.edit-modal {
    width: 100%;
    max-width: 960px;
    max-height: calc(100vh - 40px);
    overflow: auto;
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.edit-modal h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 10px;
}

.edit-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.edit-field label {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.edit-field input {
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-primary);
    font-size: 0.85rem;
    padding: 0 10px;
}

.edit-participants {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.edit-participants-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.edit-participants-head span {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 700;
}

.edit-add-btn {
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--primary);
    padding: 0 10px;
    font-size: 0.78rem;
    font-weight: 700;
}

.edit-participants-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 260px;
    overflow: auto;
}

.edit-participant-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 110px 58px;
    gap: 8px;
}

.edit-participant-row input {
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-primary);
    font-size: 0.82rem;
    padding: 0 10px;
    text-transform: uppercase;
}

.edit-remove-btn {
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: #ff8d87;
    font-size: 0.75rem;
    font-weight: 700;
}

@media (max-width: 860px) {
    .edit-grid {
        grid-template-columns: 1fr;
    }

    .edit-participant-row {
        grid-template-columns: 1fr 1fr;
    }
}.directory-page {
    padding-bottom: 100px;
}

.beta-tag {
    background: linear-gradient(135deg, #ff9800, #f44336);
    color: white;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(244, 67, 54, 0.3);
}

.beta-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 152, 0, 0.1);
    border-left: 3px solid #ff9800;
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 10px;
    color: #ff9800;
    font-size: 0.85rem;
}

.api-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05) !important;
}

.api-notice p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

.api-notice strong {
    color: #fff;
}

.search-container {
    padding: 24px;
    border-radius: 24px;
    margin-bottom: 24px;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-type-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 12px;
    gap: 4px;
}

.search-type-selector.overflow-x {
    overflow-x: auto;
    scrollbar-width: none;
}

.search-type-selector.overflow-x::-webkit-scrollbar {
    display: none;
}

.type-btn {
    flex: 1;
    min-width: fit-content;
    white-space: nowrap;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.type-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px 60px 16px 52px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s;
}

/* SayÄ± artÄ±rma tuÅŸlarÄ±nÄ± Gizle */
.search-input::-webkit-outer-spin-button,
.search-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.search-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.search-submit-btn {
    position: absolute;
    right: 8px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.search-submit-btn:hover:not(:disabled) {
    transform: scale(1.05);
    background: #0066d6;
}

.search-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.results-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.result-card {
    padding: 20px;
    border-radius: 20px;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.user-icon {
    width: 48px;
    height: 48px;
    background: rgba(0, 122, 255, 0.15);
    color: var(--primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.callsign-info,
.dmr-id-info {
    display: flex;
    flex-direction: column;
}

.dmr-id-info {
    margin-left: auto;
    text-align: right;
}

.label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.callsign,
.dmr-id {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0;
}

.callsign {
    color: var(--text-primary);
}

.dmr-id {
    color: var(--primary);
}

.result-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.info-item span {
    color: var(--text-primary);
    font-weight: 500;
}

.remarks {
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 14px;
    border-radius: 10px;
    margin-top: 4px;
}

.remarks span {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-secondary);
}

.result-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.action-btn.aprs {
    border-color: rgba(48, 209, 88, 0.2);
    color: #30d158;
}

.action-btn.aprs:hover {
    background: rgba(48, 209, 88, 0.1);
}

/* APRS Specific Styles */
.aprs-card {
    border-left: 4px solid #30d158;
}

.user-icon.aprs {
    background: rgba(48, 209, 88, 0.15);
    color: #30d158;
}

.symbol-info {
    margin-left: auto;
    text-align: right;
}

.symbol-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 8px;
    font-family: monospace;
    font-weight: bold;
    color: var(--text-primary);
}

.result-body.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .result-body.grid {
        grid-template-columns: 1fr;
    }
}

.info-item.full {
    grid-column: 1 / -1;
}

.val-group {
    display: flex;
    flex-direction: column;
}

.v-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.result-actions .map {
    border-color: rgba(0, 122, 255, 0.2);
    color: var(--primary);
}

.result-actions .map:hover {
    background: rgba(0, 122, 255, 0.1);
}

.error-card {
    padding: 20px;
    border-radius: 20px;
    background: rgba(255, 59, 48, 0.05);
    border: 1px solid rgba(255, 59, 48, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    margin-bottom: 24px;
}

.error-card p {
    margin: 0;
    color: #ff453a;
}

.error-card .hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.fallback-actions {
    margin-top: 8px;
    width: 100%;
}

.fallback-actions .action-btn {
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
}

.fallback-actions .action-btn:hover {
    background: #0066d6;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
}

/* Map Modal Styles */
.map-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05) !important;
}

.api-notice p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

.api-notice strong {
    color: #fff;
}

.map-modal {
    width: 100%;
    max-width: 1000px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge-bm {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.2);
    margin-top: 4px;
    display: inline-block;
    font-weight: 600;
}

.id-info-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
}

.id-info-item {
    display: flex;
    flex-direction: column;
}

.remarks-inline {
    opacity: 0.6;
    font-size: 0.85em;
    margin-left: 4px;
}

.bm-info {
    color: #2ecc71 !important;
}

.last-seen {
    opacity: 0.7;
    font-size: 0.9em;
}

/* Cleanup: Remove old modal styles if they are no longer needed */
/* Leaving them for now to avoid accidental breakage, but added new logic above */

.map-modal-header {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.map-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.map-external-btn {
    padding: 4px 10px;
    font-size: 0.75rem;
    height: auto;
    background: rgba(255, 255, 255, 0.1);
}

.map-external-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.map-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

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

.control-group label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.map-select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
}

.map-select:focus {
    border-color: var(--accent-color);
}

.control-group.checkbox {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding-top: 14px;
}

.control-group.checkbox input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.control-group.checkbox label {
    text-transform: none;
    font-size: 0.85rem;
    cursor: pointer;
}

.map-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .map-controls {
        gap: 8px;
    }

    .map-select {
        font-size: 0.75rem;
        padding: 2px 4px;
    }

    .control-group.checkbox label {
        font-size: 0.75rem;
    }
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ff453a;
}

.map-iframe-container {
    flex: 1;
    position: relative;
    background: #000;
}

.map-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
