/* ===== CSS Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #0f172a;
    --dark-alt: #1e293b;
    --dark-lighter: #334155;
    --light: #f8fafc;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --border: #334155;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

html {
    overflow-x: hidden;
    width: 100%;
}

/* ===== Navigation ===== */
.nav-bar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.nav-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: var(--dark-lighter);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.nav-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ===== Pages ===== */
.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

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

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

/* ===== Cards ===== */
.card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    width: 100%;
    max-width: 100%;
}

.card-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Configuration Inputs ===== */
.config-section {
    margin-bottom: 1.5rem;
}

.config-label {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(51, 65, 85, 0.4);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.config-label:hover {
    border-color: var(--primary);
    background: rgba(51, 65, 85, 0.6);
}

.label-icon {
    font-size: 1.5rem;
    grid-column: 1;
    grid-row: 1;
}

.label-text {
    font-weight: 500;
    font-size: 1rem;
    grid-column: 1;
    grid-row: 1;
    margin-left: 2rem;
}

.config-input {
    width: 80px;
    padding: 0.5rem;
    background: var(--dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.config-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Number Control Buttons */
.number-control {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    grid-column: 2;
    grid-row: 1;
}

.btn-number {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn-number:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

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

.number-control .unit {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    white-space: nowrap;
    margin-left: 0.5rem;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

/* ===== Toggle Switches ===== */
.toggle-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(51, 65, 85, 0.4);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-label:hover {
    border-color: var(--primary);
    background: rgba(51, 65, 85, 0.6);
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    width: 50px;
    height: 26px;
    background: var(--dark-lighter);
    border-radius: 13px;
    position: relative;
    transition: all 0.3s ease;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: all 0.3s ease;
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider::after {
    transform: translateX(24px);
}

.toggle-text {
    flex: 1;
    font-weight: 500;
}

/* ===== Buttons ===== */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-large {
    width: 100%;
    padding: 1.25rem;
    font-size: 1.25rem;
    margin-top: 1rem;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.btn-paypal {
    background: #0070ba;
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-paypal:hover {
    background: #005a94;
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 1.2rem;
}

/* ===== Timer Page ===== */
.timer-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.timer-content {
    text-align: center;
    padding: 2rem;
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.phase-indicator {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.progress-ring-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.progress-ring {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 8;
}

.progress-ring-progress {
    fill: none;
    stroke: var(--primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 816.81;
    stroke-dashoffset: 816.81;
    transition: stroke 0.3s ease, stroke-dashoffset 1s linear;
}

.timer-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 10;
}

.round-info {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.timer-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.completion-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-done {
    background: linear-gradient(135deg, var(--success), #059669);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    animation: pulseGlow 2s ease-in-out infinite;
}

.btn-done:hover {
    background: linear-gradient(135deg, #059669, var(--success));
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 6px 25px rgba(16, 185, 129, 0.8);
    }
}

.progress-bar-container {
    width: 100%;
    max-width: 400px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 1s linear, background 0.3s ease;
    border-radius: 4px;
}

/* ===== History Page ===== */
.history-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(51, 65, 85, 0.4);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.history-controls {
    margin-bottom: 2rem;
    text-align: center;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    background: rgba(51, 65, 85, 0.4);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.history-item:hover {
    border-color: var(--primary);
    background: rgba(51, 65, 85, 0.6);
    transform: translateX(5px);
}

.history-icon {
    font-size: 2rem;
}

.history-details {
    flex: 1;
}

.history-date {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.history-info {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem 1rem;
    font-size: 1.1rem;
}

/* ===== Donate Page ===== */
.donate-card {
    text-align: center;
}

.donate-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.donate-benefits {
    background: rgba(51, 65, 85, 0.4);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.donate-benefits h3 {
    margin-bottom: 1rem;
    color: var(--text);
}

.donate-benefits ul {
    list-style: none;
    padding: 0;
}

.donate-benefits li {
    padding: 0.5rem 0;
    font-size: 1rem;
}

.paypal-container {
    margin: 2rem 0;
}

.donate-instruction {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.donate-note {
    margin-top: 1rem;
    color: var(--text-muted);
}

.thank-you {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
}

.thank-you h3 {
    margin-bottom: 0.5rem;
    color: var(--text);
}

/* ===== Install Guide Page ===== */
.install-card {
    max-width: 900px;
    margin: 0 auto;
}

.install-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.install-description {
    font-size: 1.15rem;
    color: var(--text);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.install-benefits-box {
    background: rgba(99, 102, 241, 0.1);
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: left;
}

.install-benefits-box h3 {
    color: var(--text);
    margin-bottom: 1rem;
    text-align: center;
}

.install-benefits-box ul {
    list-style: none;
    padding: 0;
}

.install-benefits-box li {
    padding: 0.5rem 0;
    font-size: 1.05rem;
    color: var(--text);
}

.install-section {
    margin: 3rem 0;
    padding: 2rem;
    background: rgba(51, 65, 85, 0.3);
    border-radius: 16px;
    border: 2px solid var(--border);
}

.platform-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.platform-icon {
    font-size: 3rem;
}

.platform-header h3 {
    font-size: 1.8rem;
    color: var(--text);
    margin: 0;
}

.install-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.install-step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    background: rgba(30, 41, 59, 0.5);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
}

.install-step:hover {
    background: rgba(30, 41, 59, 0.7);
    transform: translateX(5px);
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    color: var(--text);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.visual-hint {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.icon-demo {
    font-size: 2rem;
}

.hint-text {
    color: var(--text);
    font-size: 0.95rem;
}

.install-note {
    margin-top: 1.5rem;
    padding: 1rem 1.5rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: var(--text);
}

.ios-note {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}

.install-note strong {
    color: var(--warning);
}

.ios-section {
    border-color: #a855f7;
}

.android-section {
    border-color: #10b981;
}

.desktop-section {
    border-color: #3b82f6;
}

.install-troubleshooting {
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(51, 65, 85, 0.3);
    border-radius: 12px;
}

.install-troubleshooting h3 {
    color: var(--text);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.trouble-item {
    margin-bottom: 2rem;
}

.trouble-item h4 {
    color: var(--text);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.trouble-item p {
    color: var(--text-muted);
    line-height: 1.6;
}

.trouble-item ul {
    margin-left: 1.5rem;
    color: var(--text-muted);
}

.trouble-item li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.install-alternative {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    text-align: center;
}

.install-alternative h3 {
    color: var(--text);
    margin-bottom: 1rem;
}

.install-alternative p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* ===== Privacy Policy Page ===== */
.policy-card {
    text-align: left;
}

.policy-content {
    color: var(--text-muted);
}

.policy-section {
    margin-bottom: 2rem;
}

.policy-section h3 {
    color: var(--text);
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.policy-section p {
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

.policy-section ul {
    margin-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.policy-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.policy-section strong {
    color: var(--text);
}

.last-updated {
    display: block;
    margin-top: 1rem;
    text-align: center;
    color: var(--text-muted);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .nav-container {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .nav-title {
        font-size: 1.3rem;
        width: 100%;
        text-align: center;
    }
    
    .nav-buttons {
        width: 100%;
        justify-content: center;
        gap: 0.4rem;
    }
    
    .nav-btn {
        flex: 1;
        min-width: 60px;
        max-width: 80px;
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .nav-btn span {
        display: block;
        font-size: 1.2rem;
    }
    
    .container {
        padding: 1rem 0.75rem;
    }
    
    .card {
        padding: 1.25rem;
        border-radius: 12px;
    }
    
    .card-title {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
    }
    
    .config-section {
        margin-bottom: 1rem;
    }
    
    .config-label {
        padding: 0.875rem;
        gap: 0.5rem;
        grid-template-columns: 1fr 1fr;
    }
    
    .label-icon {
        font-size: 1.3rem;
    }
    
    .label-text {
        font-size: 0.95rem;
        margin-left: 2rem;
    }
    
    .config-input {
        width: 70px;
        padding: 0.5rem 0.25rem;
        font-size: 1rem;
    }
    
    .unit {
        font-size: 0.85rem;
    }
    
    .timer-display {
        font-size: 2.75rem;
    }
    
    .progress-ring-container {
        width: 250px;
        height: 250px;
        margin: 0 auto 1.5rem;
        flex-shrink: 0;
    }
    
    .progress-ring {
        width: 250px;
        height: 250px;
    }
    
    .timer-content {
        padding: 1.5rem 1rem;
        max-width: 100%;
    }
    
    .phase-indicator {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .round-info {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }
    
    /* Support Banner Mobile */
    .support-banner {
        margin-bottom: 1rem;
        padding: 0.875rem 1rem;
    }
    
    .support-banner-content {
        gap: 0.75rem;
    }
    
    .support-banner-icon {
        font-size: 1.5rem;
    }
    
    .support-banner-text strong {
        font-size: 0.95rem;
    }
    
    .support-banner-text span {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0.75rem 0.5rem;
    }
    
    .nav-title {
        font-size: 1.2rem;
    }
    
    .nav-btn {
        min-width: 55px;
        max-width: 75px;
        padding: 0.4rem 0.2rem;
        font-size: 0.7rem;
    }
    
    .nav-btn span {
        font-size: 1.1rem;
    }
    
    .container {
        padding: 1rem 0.5rem;
    }
    
    .card {
        padding: 1rem;
        border-radius: 10px;
    }
    
    .card-title {
        font-size: 1.4rem;
    }
    
    .config-label {
        padding: 0.75rem;
        gap: 0.5rem;
        grid-template-columns: 1fr 1fr;
    }
    
    .label-icon {
        font-size: 1.2rem;
    }
    
    .label-text {
        font-size: 0.9rem;
        margin-left: 1.75rem;
    }
    
    .config-input {
        width: 65px;
        padding: 0.4rem 0.2rem;
        font-size: 0.95rem;
    }
    
    .btn-number {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
    
    .unit {
        font-size: 0.8rem;
    }
    
    .timer-display {
        font-size: 2.25rem;
    }
    
    .progress-ring-container {
        width: 200px;
        height: 200px;
        margin: 0 auto 1rem;
        flex-shrink: 0;
    }
    
    .progress-ring {
        width: 200px;
        height: 200px;
    }
    
    .timer-content {
        padding: 1rem 0.5rem;
    }
    
    .phase-indicator {
        font-size: 1.3rem;
        margin-bottom: 1rem;
        letter-spacing: 2px;
    }
    
    .round-info {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .timer-controls,
    .completion-controls {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        max-width: 280px;
        margin: 0 auto 1.5rem;
    }
    
    .control-btn {
        width: 100%;
        padding: 0.875rem 1rem;
    }
    
    .btn-done {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .close-btn {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
        top: 0.75rem;
        right: 0.75rem;
    }
    
    /* Support Banner Small Mobile */
    .support-banner {
        padding: 0.75rem 0.875rem;
        margin-bottom: 0.875rem;
    }
    
    .support-banner-icon {
        font-size: 1.3rem;
    }
    
    .support-banner-text strong {
        font-size: 0.9rem;
    }
    
    .support-banner-text span {
        font-size: 0.75rem;
    }
    
    .support-banner-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    /* History Card Mobile */
    .workout-card {
        padding: 0.875rem;
    }
    
    .workout-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .workout-date {
        font-size: 0.85rem;
    }
    
    .workout-badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    .workout-stats {
        gap: 0.5rem;
    }
    
    .stat-value {
        font-size: 1.1rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    /* Button sizing */
    .btn-primary,
    .btn-secondary,
    .btn-danger {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* ===== Print Styles ===== */
@media print {
    .nav-bar, .btn, .timer-controls {
        display: none;
    }
}

/* ===== Milestone Celebration Modal ===== */
.milestone-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
    padding: 1rem;
}

.milestone-dialog {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease;
    position: relative;
    overflow: hidden;
}

.milestone-dialog::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: sparkle 3s linear infinite;
}

@keyframes sparkle {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.milestone-emoji {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: bounce 0.6s ease;
    position: relative;
    z-index: 1;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-20px); }
    50% { transform: translateY(-10px); }
    75% { transform: translateY(-15px); }
}

.milestone-title {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.milestone-message {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.milestone-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.milestone-stat {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1rem 2rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.milestone-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.milestone-stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.25rem;
}

.milestone-support {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

.milestone-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.btn-milestone-support,
.btn-milestone-close {
    padding: 0.875rem 1.75rem;
    border-radius: 50px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 150px;
}

.btn-milestone-support {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.btn-milestone-support:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6);
}

.btn-milestone-close {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
}

.btn-milestone-close:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
}

/* ===== Support Banner ===== */
.support-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.support-banner-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.support-banner-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.support-banner-text {
    flex: 1;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.support-banner-text strong {
    font-size: 1rem;
    font-weight: 600;
}

.support-banner-text span {
    font-size: 0.875rem;
    opacity: 0.9;
}

.support-banner-btn {
    padding: 0.625rem 1.25rem;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.support-banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.support-banner-close {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.support-banner-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Responsive adjustments for milestone and banner */
@media (max-width: 600px) {
    .milestone-dialog {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }
    
    .milestone-emoji {
        font-size: 4rem;
    }
    
    .milestone-title {
        font-size: 2rem;
    }
    
    .milestone-message {
        font-size: 1rem;
    }
    
    .milestone-buttons {
        flex-direction: column;
    }
    
    .btn-milestone-support,
    .btn-milestone-close {
        width: 100%;
    }
    
    .support-banner-content {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .support-banner-btn {
        order: 3;
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .support-banner-close {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
    }
}

/* iPhone 12/13 and similar (390px) specific fixes */
@media (max-width: 400px) {
    .nav-container {
        padding: 0.5rem;
    }
    
    .nav-title {
        font-size: 1.1rem;
    }
    
    .nav-btn {
        min-width: 50px;
        max-width: 70px;
        padding: 0.4rem 0.15rem;
        font-size: 0.65rem;
    }
    
    .nav-btn span {
        font-size: 1rem;
    }
    
    .container {
        padding: 0.875rem 0.5rem;
    }
    
    .card {
        padding: 0.875rem;
    }
    
    .card-title {
        font-size: 1.3rem;
    }
    
    .config-label {
        padding: 0.625rem;
    }
    
    .support-banner {
        padding: 0.625rem 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .support-banner-text strong {
        font-size: 0.85rem;
    }
    
    .support-banner-text span {
        font-size: 0.7rem;
    }
    
    .milestone-dialog {
        margin: 0 0.5rem;
        padding: 1.5rem 1rem;
    }
    
    /* Timer page for small screens */
    .progress-ring-container {
        width: 180px;
        height: 180px;
        flex-shrink: 0;
    }
    
    .progress-ring {
        width: 180px;
        height: 180px;
    }
    
    .timer-display {
        font-size: 2rem;
    }
    
    .phase-indicator {
        font-size: 1.2rem;
        margin-bottom: 0.875rem;
        letter-spacing: 1.5px;
    }
    
    .round-info {
        font-size: 1rem;
        margin-bottom: 0.875rem;
    }
    
    .timer-content {
        padding: 0.75rem 0.5rem;
    }
    
    .close-btn {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
        top: 0.5rem;
        right: 0.5rem;
    }
}

