/* ===== CSS Variables & Reset ===== */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --active-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --dark-bg: #0a0a1a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --glow-purple: rgba(102, 126, 234, 0.5);
    --glow-green: rgba(56, 239, 125, 0.5);
    --shadow-dark: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===== App Container ===== */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ===== Background Effects ===== */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.wave {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    border-radius: 45%;
    animation: wave-rotate 20s linear infinite;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.app-container.active .wave {
    opacity: 1;
}

.wave1 {
    background: linear-gradient(135deg, rgba(56, 239, 125, 0.03) 0%, transparent 50%);
    animation-duration: 25s;
}

.wave2 {
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.05) 0%, transparent 50%);
    animation-duration: 30s;
    animation-direction: reverse;
}

.wave3 {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, transparent 50%);
    animation-duration: 35s;
}

@keyframes wave-rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ===== Header ===== */
.header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    font-size: 2rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 300;
}

/* ===== Main Control ===== */
.main-control {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.control-ring {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.outer-ring {
    width: 260px;
    height: 260px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.2));
    padding: 15px;
    box-shadow:
        0 25px 50px var(--shadow-dark),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.middle-ring {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.3), rgba(255, 255, 255, 0.02));
    padding: 15px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.power-button {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: none;
    background: var(--primary-gradient);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow:
        0 10px 40px var(--glow-purple),
        inset 0 -5px 20px rgba(0, 0, 0, 0.3),
        inset 0 5px 20px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.power-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 40%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 60%);
    transform: rotate(45deg);
    animation: shimmer 10s ease-in-out infinite;
}

@keyframes shimmer {

    0%,
    70% {
        transform: translateX(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

.power-button:hover {
    transform: scale(1.02);
    box-shadow:
        0 15px 50px var(--glow-purple),
        inset 0 -5px 20px rgba(0, 0, 0, 0.3),
        inset 0 5px 20px rgba(255, 255, 255, 0.3);
}

.power-button:active {
    transform: scale(0.98);
}

.power-button.active {
    background: var(--active-gradient);
    box-shadow:
        0 10px 50px var(--glow-green),
        inset 0 -5px 20px rgba(0, 0, 0, 0.3),
        inset 0 5px 20px rgba(255, 255, 255, 0.2);
    animation: pulse 2s ease-in-out infinite;
}

.power-button.active::before {
    display: none;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 10px 50px var(--glow-green), inset 0 -5px 20px rgba(0, 0, 0, 0.3), inset 0 5px 20px rgba(255, 255, 255, 0.2);
    }

    50% {
        box-shadow: 0 15px 70px var(--glow-green), inset 0 -5px 20px rgba(0, 0, 0, 0.3), inset 0 5px 20px rgba(255, 255, 255, 0.2);
    }
}

.power-icon {
    width: 60px;
    height: 60px;
    color: white;
}

.power-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.status-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.2em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ===== Frequency Display ===== */
.frequency-display {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    padding: 0.75rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.app-container.active .frequency-display {
    opacity: 1;
    border-color: rgba(56, 239, 125, 0.3);
    box-shadow: 0 0 20px rgba(56, 239, 125, 0.1);
}

.freq-value {
    font-size: 2rem;
    font-weight: 700;
    background: var(--active-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.freq-unit {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ===== Frequency Control ===== */
.frequency-control {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.control-label {
    display: block;
    text-align: center;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.slider-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.frequency-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.3), rgba(56, 239, 125, 0.3));
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.frequency-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--active-gradient);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px var(--glow-green);
    transition: transform 0.2s ease;
}

.frequency-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.frequency-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--active-gradient);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 10px var(--glow-green);
}

.frequency-info {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

/* ===== Info Cards ===== */
.info-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.info-card {
    padding: 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    text-align: center;
    transition: all 0.3s ease;
}



.card-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.75rem;
}

.info-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.info-card p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
    position: relative;
    z-index: 1;
}

.footer p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.copyright {
    font-size: 0.75rem !important;
    color: var(--text-muted) !important;
    margin-top: 0.5rem;
}

/* ===== Responsive Design ===== */
@media (max-width: 400px) {
    .app-container {
        padding: 1.5rem 1rem;
    }

    .outer-ring {
        width: 220px;
        height: 220px;
    }

    .power-icon {
        width: 50px;
        height: 50px;
    }

    .status-text {
        font-size: 1.25rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .info-cards {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 481px) {
    .app-container {
        padding: 3rem 2rem;
    }

    .outer-ring {
        width: 300px;
        height: 300px;
    }

    .power-icon {
        width: 70px;
        height: 70px;
    }

    .status-text {
        font-size: 1.75rem;
    }
}

@media (min-height: 800px) {
    .main-control {
        padding: 2rem 0;
    }
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles */
.power-button:focus-visible,
.frequency-slider:focus-visible {
    outline: 2px solid var(--text-primary);
    outline-offset: 4px;
}

/* ===== Navigation Menu ===== */
.nav-menu {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.nav-link {
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 25px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

/* ===== Page Container ===== */
.page-container {
    padding-top: 1.5rem;
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header .subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.last-updated {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== Content Section ===== */
.content-section {
    flex: 1;
}

.content-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
}

.content-card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.content-card p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.content-card ul {
    color: var(--text-secondary);
    margin-left: 1.25rem;
    font-size: 0.9rem;
}

.content-card ul li {
    margin-bottom: 0.5rem;
}

.content-card a {
    color: #667eea;
    text-decoration: underline;
}

.highlight-card {
    border-color: rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

/* ===== Info & Warning Boxes ===== */
.info-box,
.warning-box {
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
}

.info-box {
    background: rgba(102, 126, 234, 0.1);
    border-left: 3px solid #667eea;
}

.warning-box {
    background: rgba(245, 87, 108, 0.1);
    border-left: 3px solid #f5576c;
}

.info-box p,
.warning-box p {
    margin-bottom: 0.5rem;
}

.info-box p:last-child,
.warning-box p:last-child {
    margin-bottom: 0;
}

/* ===== Frequency Table ===== */
.frequency-table {
    margin-top: 1rem;
}

.freq-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.freq-row.recommended {
    background: rgba(56, 239, 125, 0.1);
    border: 1px solid rgba(56, 239, 125, 0.3);
}

.freq-range {
    font-weight: 600;
    color: var(--text-primary);
}

.freq-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ===== Tips List ===== */
.tips-list {
    list-style: none;
    margin-left: 0;
}

.tips-list li {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 0.75rem;
}

.tip-icon {
    font-size: 1.5rem;
}

.tips-list li div strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.25rem;
}

.tips-list li div p {
    margin: 0;
    font-size: 0.85rem;
}

/* ===== FAQ Styles ===== */
.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
}

.faq-question {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.faq-answer {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.faq-answer p {
    margin-bottom: 0.75rem;
}

.faq-answer ul {
    margin-left: 1.25rem;
    margin-bottom: 0.75rem;
}

.faq-answer ul li {
    margin-bottom: 0.5rem;
}

/* ===== Footer Links ===== */
.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* ===== Responsive for Pages ===== */
@media (max-width: 400px) {
    .nav-link {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }

    .content-card {
        padding: 1.25rem;
    }

    .freq-row {
        flex-direction: column;
        gap: 0.25rem;
    }
}