/**
 * Arbeitszeit Helden - Custom Styles
 * Timer & Rechner Tools für den Arbeitsalltag
 */

/* Root Variables */
:root {
    --brand-primary: #1e88e5;
    --brand-secondary: #64748b;
    --brand-accent: #ff6b35;
    --brand-background: #f8fafc;
    --brand-text: #1e293b;
}

/* Base Styles */
body {
    background-color: var(--brand-background);
    color: var(--brand-text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header - only apply generic styles if not using glassmorphism header */
header:not(.ah-header) {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: white;
}

header:not(.ah-header) h1 {
    margin-bottom: 0.5rem;
}

/* Main Container */
main {
    padding: 2rem 1rem;
    min-height: 60vh;
}

/* Footer - only apply generic styles if not using glassmorphism footer */
footer:not(.ah-footer) {
    text-align: center;
    padding: 1rem;
    background-color: var(--brand-secondary);
    color: white;
}

footer:not(.ah-footer) a {
    color: white;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-navigation button {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--brand-primary);
    background: transparent;
    color: var(--brand-primary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    border-radius: 4px;
}

.tab-navigation button:hover:not(:disabled) {
    background: rgba(30, 136, 229, 0.1);
}

.tab-navigation button[aria-selected="true"] {
    background: var(--brand-primary);
    color: white;
}

.tab-navigation button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Timer Panel */
.timer-panel {
    text-align: center;
}

.timer-panel[hidden] {
    display: none;
}

/* Timer Phase Label */
.timer-phase {
    font-size: 1.2rem;
    color: var(--brand-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Timer Display */
.timer-display {
    font-family: 'Courier New', Courier, monospace;
    font-size: 5rem;
    font-weight: bold;
    text-align: center;
    margin: 2rem 0;
    color: var(--brand-text);
    letter-spacing: 0.1em;
}

/* Timer Controls */
.timer-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.timer-controls button {
    min-width: 100px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.timer-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.timer-controls .btn-primary {
    background: var(--brand-primary);
    color: white;
}

.timer-controls .btn-primary:hover:not(:disabled) {
    background: #1565c0;
}

.timer-controls .btn-secondary {
    background: var(--brand-secondary);
    color: white;
}

.timer-controls .btn-secondary:hover:not(:disabled) {
    background: #475569;
}

.timer-controls .btn-settings {
    background: transparent;
    border: 2px solid var(--brand-secondary);
    color: var(--brand-secondary);
}

.timer-controls .btn-settings:hover:not(:disabled) {
    background: var(--brand-secondary);
    color: white;
}

/* Session Count */
.session-count {
    font-size: 0.9rem;
    color: var(--brand-secondary);
    margin-top: 1rem;
}

/* Lap List */
.lap-list {
    margin-top: 2rem;
    max-height: 250px;
    overflow-y: auto;
    text-align: left;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
}

.lap-list:empty {
    display: none;
}

.lap-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
    font-family: 'Courier New', Courier, monospace;
}

.lap-item:last-child {
    border-bottom: none;
}

.lap-number {
    font-weight: bold;
    color: var(--brand-primary);
    min-width: 40px;
}

.lap-times {
    display: flex;
    gap: 1.5rem;
}

.lap-time {
    color: var(--brand-text);
}

.total-time {
    color: var(--brand-secondary);
}

/* Settings Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--brand-text);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.modal-buttons button {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.modal-buttons .btn-primary {
    background: var(--brand-primary);
    color: white;
}

.modal-buttons .btn-secondary {
    background: var(--brand-secondary);
    color: white;
}

/* Coming Soon Text */
.coming-soon {
    color: var(--brand-secondary);
    font-style: italic;
    margin-top: 2rem;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .timer-display {
        font-size: 3.5rem;
    }

    .tab-navigation button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .timer-controls button {
        min-width: 80px;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Section Separator */
.section-separator {
    border: none;
    border-top: 2px solid #e2e8f0;
    margin: 3rem 0 2rem 0;
}

.section-title {
    text-align: center;
    color: var(--brand-secondary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Calculator Panel */
.calculator-panel {
    max-width: 500px;
    margin: 0 auto;
    padding: 1.5rem;
}

.calculator-panel[hidden] {
    display: none;
}

.calculator-input-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Input Groups */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 500;
    color: var(--brand-text);
}

.input-group input,
.input-group select {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--brand-primary);
    outline: 2px solid rgba(30, 136, 229, 0.2);
}

/* Time Dropdowns */
.time-dropdowns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.time-selects {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.time-selects select {
    flex: 1;
    padding: 0.5rem;
}

.time-separator {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--brand-secondary);
}

/* Mode Toggle Button */
.btn-mode-toggle {
    background: transparent;
    border: 2px solid var(--brand-secondary);
    color: var(--brand-secondary);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-mode-toggle:hover {
    background: var(--brand-secondary);
    color: white;
}

/* Calculate Button */
.btn-calculate {
    background: var(--brand-accent);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
}

.btn-calculate:hover {
    background: #e55a2b;
    transform: translateY(-1px);
}

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

/* Rechenweg Container */
.rechenweg-container {
    margin-top: 1.5rem;
    min-height: 50px;
}

.rechenweg-error {
    color: #dc2626;
    background: #fef2f2;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #fecaca;
}

/* Rechenweg Steps */
.rechenweg {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
}

.rechenweg-step {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.rechenweg-step:last-of-type {
    border-bottom: none;
}

.rechenweg-label {
    color: var(--brand-secondary);
}

.rechenweg-value {
    font-weight: 500;
    color: var(--brand-text);
}

.rechenweg-result {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    margin-top: 0.5rem;
    background: var(--brand-primary);
    color: white;
    border-radius: 4px;
    font-weight: 600;
}

.rechenweg-result .rechenweg-label,
.rechenweg-result .rechenweg-value {
    color: white;
}

/* Result Container */
.result-container {
    margin-top: 1.5rem;
    text-align: center;
}

.result-highlight {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, var(--brand-primary), #1565c0);
    color: white;
    padding: 1.5rem 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
}

.result-value {
    font-size: 2.5rem;
    font-weight: bold;
    font-family: 'Courier New', Courier, monospace;
}

.result-unit {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

/* Countdown Input Group */
.countdown-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.countdown-input-group label {
    font-weight: 500;
}

.error-message {
    color: #dc2626;
    font-size: 0.875rem;
}

/* Calculator responsive */
@media (max-width: 600px) {
    .time-dropdowns {
        grid-template-columns: 1fr;
    }

    .result-value {
        font-size: 2rem;
    }

    .result-highlight {
        padding: 1rem 2rem;
    }
}

/* Date Input Styling */
input[type="date"] {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

input[type="date"]:focus {
    border-color: var(--brand-primary);
    outline: 2px solid rgba(30, 136, 229, 0.2);
}

/* KW Result - larger display */
.kw-result .result-value {
    font-size: 3rem;
    letter-spacing: 0.05em;
}

.kw-result .result-unit {
    font-size: 1.2rem;
    font-weight: 500;
}

/* Result Details */
.result-details {
    color: var(--brand-secondary);
    margin-top: 1rem;
    font-size: 0.95rem;
}

/* Date input responsive */
@media (max-width: 600px) {
    .kw-result .result-value {
        font-size: 2.5rem;
    }
}

/* Settings Panel Styles */
.settings-section-title {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--pico-muted-border-color, #e2e8f0);
    color: var(--brand-text);
}

.settings-section-title:first-child {
    margin-top: 0;
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.setting-item label {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
    font-weight: 500;
    color: var(--brand-text);
}

.setting-item input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.setting-item input[type="number"] {
    width: 100px;
}

.setting-item input[type="range"] {
    flex: 1;
    max-width: 200px;
}

.setting-item small {
    display: block;
    width: 100%;
    color: var(--brand-secondary);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Settings responsive adjustments */
@media (max-width: 480px) {
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .setting-item label {
        min-width: auto;
    }

    .setting-item input[type="number"],
    .setting-item input[type="range"] {
        width: 100%;
        max-width: none;
    }
}

/* History Panel Styles */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.history-header h3 {
    margin: 0;
}

.history-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-nav button {
    padding: 0.25rem 0.75rem;
    min-width: auto;
}

#history-month-display {
    font-weight: 600;
    min-width: 140px;
    text-align: center;
}

.history-calendar {
    margin-bottom: 1.5rem;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: var(--brand-secondary);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--brand-background);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
    position: relative;
    border: 1px solid #e2e8f0;
}

.calendar-day:hover {
    background: var(--brand-primary);
    color: white;
}

.calendar-day.other-month {
    color: var(--brand-secondary);
    opacity: 0.5;
}

.calendar-day.today {
    border: 2px solid var(--brand-primary);
}

.calendar-day.selected {
    background: var(--brand-primary);
    color: white;
}

.calendar-day .activity-dots {
    display: flex;
    gap: 2px;
    margin-top: 2px;
}

.calendar-day .activity-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--brand-primary);
}

.calendar-day .activity-dot.break {
    background: var(--brand-secondary);
}

.history-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--brand-background);
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--brand-secondary);
}

.history-day-detail {
    background: var(--brand-background);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
}

.history-day-detail h4 {
    margin: 0 0 0.75rem 0;
}

.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.history-list li:last-child {
    border-bottom: none;
}

.history-list .session-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-list .session-type {
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    background: var(--brand-primary);
    color: white;
}

.history-list .session-type.break {
    background: var(--brand-secondary);
}

.history-list .session-actions button {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    min-width: auto;
}

.history-trash {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.history-trash ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

.history-trash li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: #fef2f2;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

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

    .calendar-day {
        font-size: 0.8rem;
    }
}

/* E-E-A-T Authority Sources */
.ah-authority-sources {
    margin-top: 40px;
    padding: 30px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(30, 136, 229, 0.15);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
}
.ah-authority-sources h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0 0 8px 0;
}
.ah-authority-intro {
    line-height: 1.7;
    color: #cbd5e1;
    margin-bottom: 20px;
}
.ah-authority-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.ah-authority-links li {
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: rgba(30, 136, 229, 0.08);
    border: 1px solid rgba(30, 136, 229, 0.2);
    border-radius: 12px;
    transition: all 0.2s ease;
}
.ah-authority-links li:hover {
    background: rgba(30, 136, 229, 0.15);
    border-color: rgba(30, 136, 229, 0.4);
    transform: translateY(-1px);
}
.ah-authority-links a {
    color: #e2e8f0;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ah-authority-links a:hover {
    color: #1e88e5;
}
.ah-authority-links a::before {
    content: "↗";
    color: #1e88e5;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.ah-authority-source {
    color: #64748b;
    font-size: 0.8rem;
    margin-top: 4px;
    padding-left: 22px;
}

@media (min-width: 600px) {
    .ah-authority-links {
        grid-template-columns: repeat(2, 1fr);
    }
}
/**
 * Glassmorphism UI System
 * Premium dark theme with blue accents
 * For Arbeitszeit Helden
 */

/* ============================================
   GRADIENT TEXT MIXINS
   ============================================ */

/* Light gradient for dark backgrounds */
.gradient-text-light {
    background: linear-gradient(135deg, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Dark gradient for light backgrounds */
.gradient-text-dark {
    background: linear-gradient(135deg, #1e293b, #1e88e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   GRADIENT BORDERS - ALL ELEMENTS
   ============================================ */

/* Gradient border utility - using pseudo-element technique */
.gradient-border {
    position: relative;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 16px;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, #ffffff, #94a3b8);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Apply gradient border to all bordered elements */
.ah-glass-panel,
.timer-panel,
.calculator-panel,
.ah-header,
.ah-footer-section,
.ah-footer-badges,
.ah-footer-badge,
.ah-footer-contact,
.ah-footer-legal,
.ah-footer-bottom,
.ah-footer-bottom-links a,
.modal-content,
.tab-navigation,
.tab-navigation button,
.history-calendar,
.history-day-detail,
.lap-list,
.rechenweg,
.settings-group,
.stat-item,
.calendar-day,
.input-group input,
.input-group select,
.countdown-input-group input,
input[type="date"],
.time-selects select {
    border: 1px solid transparent;
    background-image: linear-gradient(rgba(30, 41, 59, 0.6), rgba(30, 41, 59, 0.6)), linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(148, 163, 184, 0.5));
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

/* Navigation items with gradient border */
.ah-nav-item {
    border: 1px solid transparent;
    background-image: linear-gradient(rgba(30, 136, 229, 0.1), rgba(30, 136, 229, 0.1)), linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(148, 163, 184, 0.4));
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.ah-nav-item:hover {
    background-image: linear-gradient(rgba(30, 136, 229, 0.2), rgba(30, 136, 229, 0.2)), linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(148, 163, 184, 0.6));
}

/* ============================================
   GRADIENT BUTTON TEXT - ALL BUTTONS
   ============================================ */

/* Primary buttons - blue gradient background, WHITE TEXT */
.btn-primary,
.timer-controls .btn-primary,
button.btn-primary,
#pomodoro-start,
#pomodoro-pause {
    background: linear-gradient(135deg, #1e88e5, #42a5f5) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.4) !important;
}

.btn-primary:hover,
.timer-controls .btn-primary:hover,
#pomodoro-start:hover,
#pomodoro-pause:hover {
    background: linear-gradient(135deg, #42a5f5, #64b5f6) !important;
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.5) !important;
    transform: translateY(-2px);
}

/* Calculate button - DARK BLUE gradient, white text, shadow */
.btn-calculate {
    background: linear-gradient(135deg, #1e3a5f, #1e88e5) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: none !important;
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.5) !important;
}

.btn-calculate:hover {
    background: linear-gradient(135deg, #1e88e5, #2563eb) !important;
    box-shadow: 0 8px 25px rgba(30, 136, 229, 0.6) !important;
    transform: translateY(-2px);
}

/* Secondary/Settings buttons - visible white text */
.btn-secondary,
.btn-settings,
.btn-mode-toggle,
.btn-share,
.timer-controls .btn-secondary,
#pomodoro-stop,
#pomodoro-reset,
#pomodoro-settings {
    background-color: rgba(30, 136, 229, 0.2) !important;
    color: #e2e8f0 !important;
    -webkit-text-fill-color: #e2e8f0 !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

.btn-secondary:hover,
.btn-settings:hover,
.btn-mode-toggle:hover,
.btn-share:hover,
.timer-controls .btn-secondary:hover,
#pomodoro-stop:hover,
#pomodoro-reset:hover,
#pomodoro-settings:hover {
    background-color: rgba(30, 136, 229, 0.35) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-2px);
}

/* Tab navigation buttons - visible text */
.tab-navigation button:not([aria-selected="true"]) {
    background-color: rgba(30, 41, 59, 0.5) !important;
    color: #e2e8f0 !important;
    -webkit-text-fill-color: #e2e8f0 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.tab-navigation button:not([aria-selected="true"]):hover {
    background-color: rgba(30, 136, 229, 0.3) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Active tab - solid gradient background, white text */
.tab-navigation button[aria-selected="true"] {
    background: linear-gradient(135deg, #1e88e5, #42a5f5) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: none !important;
}

/* Timer display - gradient text */
.timer-display {
    background: linear-gradient(135deg, #ffffff, #94a3b8) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
}

/* Header toggle button */
.ah-header-toggle {
    background-color: rgba(30, 136, 229, 0.15) !important;
    background-image: linear-gradient(135deg, #ffffff, #94a3b8) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ah-header-toggle:hover {
    background-color: rgba(30, 136, 229, 0.25) !important;
}

/* ============================================
   MAIN CONTENT CONTAINER - Match Header/Footer Width
   ============================================ */

main.container,
main .container,
.ah-main-content,
.container {
    max-width: 1200px !important;
    margin: 0 auto;
    padding: 0 20px;
}

/* Ensure all panels and sections align with header/footer */
.timer-panel,
.calculator-panel,
.ah-glass-panel,
.hero-section,
.calculator-cards,
.cards-grid,
.rechenweg-container,
.result-container,
.history-calendar,
.settings-group,
.modal-content,
.tab-navigation,
.section-separator,
.history-header {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Individual panels can be narrower for better readability */
.timer-panel {
    max-width: 500px;
}

.calculator-panel {
    max-width: 550px;
}

.modal-content {
    max-width: 450px;
}

/* ============================================
   DARK BODY BACKGROUND
   ============================================ */

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg,
        #0a1628 0%,
        #0f172a 25%,
        #1e293b 50%,
        #0f172a 75%,
        #0a1628 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #e2e8f0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ============================================
   GRADIENT TEXT ON DARK BACKGROUNDS
   ============================================ */

/* Apply gradient text to all text elements on dark backgrounds */
.ah-header h1,
.ah-header h2,
.ah-header h3,
.ah-header p,
.ah-header span:not(.ah-header-logo),
.ah-header a,
.ah-glass-panel h1,
.ah-glass-panel h2,
.ah-glass-panel h3,
.ah-glass-panel h4,
.ah-glass-panel p,
.ah-glass-panel span,
.ah-glass-panel label,
.ah-glass-panel a,
.timer-panel h1,
.timer-panel h2,
.timer-panel h3,
.timer-panel p,
.timer-panel span,
.timer-panel label,
.timer-display,
.timer-phase,
.calculator-panel h1,
.calculator-panel h2,
.calculator-panel h3,
.calculator-panel p,
.calculator-panel span,
.calculator-panel label,
.rechenweg-label,
.rechenweg-value,
.rechenweg-step,
.lap-item,
.lap-number,
.stat-item .stat-label,
.stat-item .stat-value,
.history-calendar h1,
.history-calendar h2,
.history-calendar h3,
.history-calendar p,
.history-calendar label,
.calendar-day,
.settings-group h1,
.settings-group h2,
.settings-group h3,
.settings-group p,
.settings-group label,
.settings-group span,
.modal-content h1,
.modal-content h2,
.modal-content h3,
.modal-content h4,
.modal-content p,
.modal-content label,
.modal-content span,
.input-group label,
.countdown-input-group label {
    background: linear-gradient(135deg, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons with visible text (not gradient) */
.tab-navigation button:not([aria-selected="true"]),
.ah-nav-item:not(.active) {
    background: linear-gradient(135deg, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Tab buttons and nav items preserve their original styling for non-active states */
.tab-navigation button:not([aria-selected="true"]):hover,
.ah-nav-item:not(.active):hover {
    background: rgba(30, 136, 229, 0.2);
    border-color: rgba(30, 136, 229, 0.4);
    -webkit-text-fill-color: initial;
    color: #ffffff;
}

/* Animated background particles effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(30, 136, 229, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(30, 136, 229, 0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

/* ============================================
   GLASSMORPHISM HEADER
   ============================================ */

header.ah-header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(30, 136, 229, 0.2);
    padding: 0;
    text-align: left;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

header.ah-header h1 {
    margin-bottom: 0;
}

.ah-header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.ah-header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    padding: 15px 0;
}

.ah-header-logo {
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, #d5e7f6, #75a2c7);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* Premium SVG Logo Styling */
.ah-logo-svg {
    width: 46px;
    height: 46px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ah-header-logo:hover .ah-logo-svg {
    transform: rotate(5deg) scale(1.1);
}

.ah-header-logo:hover {
    transform: scale(1.05) rotate(3deg);
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.5);
}

/* Logo SVG pulse animation */
@keyframes ahLogoPulse {
    0%, 100% {
        filter: drop-shadow(0 0 0 rgba(54, 185, 235, 0));
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(54, 185, 235, 0.5));
    }
}

.ah-header-logo:hover .ah-logo-svg {
    animation: ahLogoPulse 2s ease-in-out infinite;
}

.ah-header-title {
    display: flex;
    flex-direction: column;
}

.ah-header-title h1 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ah-header-tagline {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: -2px;
}

/* Header Navigation */
.ah-header-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 10px 0;
}

.ah-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(30, 136, 229, 0.1);
    border: 1px solid rgba(30, 136, 229, 0.2);
    border-radius: 8px;
    color: #94a3b8;
    -webkit-text-fill-color: currentColor;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.15s ease,
                -webkit-text-fill-color 0.15s ease,
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.ah-nav-item:hover {
    background: rgba(30, 136, 229, 0.2);
    border-color: rgba(30, 136, 229, 0.4);
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.2);
}

.ah-nav-item.active {
    background: linear-gradient(135deg, #1e88e5, #42a5f5);
    border-color: transparent;
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.4);
}

.ah-nav-item .nav-icon {
    font-size: 1rem;
}

/* ============================================
   DROPDOWN NAVIGATION
   ============================================ */

/* Dropdown wrapper */
.ah-nav-dropdown {
    position: relative;
}

.ah-nav-dropdown > .ah-nav-item {
    cursor: pointer;
    padding-right: 32px;
}

.ah-nav-dropdown > .ah-nav-item::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #94a3b8;
    transition: transform 0.2s ease;
    pointer-events: none;
}

.ah-nav-dropdown:hover > .ah-nav-item::after,
.ah-nav-dropdown.open > .ah-nav-item::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Dropdown menu */
.ah-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    margin-top: 8px;
    padding: 8px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(30, 136, 229, 0.25);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(30, 136, 229, 0.08);
    z-index: 1001;
}

.ah-nav-dropdown:hover > .ah-dropdown-menu,
.ah-nav-dropdown.open > .ah-dropdown-menu {
    display: block;
}

.ah-dropdown-menu .ah-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    color: #94a3b8;
    -webkit-text-fill-color: currentColor;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.2s ease,
                color 0.15s ease,
                -webkit-text-fill-color 0.15s ease;
    white-space: nowrap;
}

.ah-dropdown-menu .ah-dropdown-item:hover {
    background: rgba(30, 136, 229, 0.2);
    color: #e2e8f0;
    -webkit-text-fill-color: #e2e8f0;
}

.ah-dropdown-menu .ah-dropdown-item.active {
    background: linear-gradient(135deg, #1e88e5, #42a5f5);
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
}

/* Active dropdown parent highlight */
.ah-nav-dropdown.active-parent > .ah-nav-item {
    background: rgba(30, 136, 229, 0.2);
    color: #e2e8f0;
    -webkit-text-fill-color: #e2e8f0;
}

/* Mobile dropdown behavior */
@media (max-width: 900px) {
    .ah-nav-dropdown > .ah-nav-item::after {
        right: 16px;
    }

    .ah-dropdown-menu {
        display: none;
        position: static;
        min-width: 100%;
        margin-top: 4px;
        margin-left: 12px;
        padding: 6px;
        background: rgba(15, 23, 42, 0.6);
        border: 1px solid rgba(30, 136, 229, 0.15);
    }

    .ah-nav-dropdown.open > .ah-dropdown-menu {
        display: block;
    }

    .ah-dropdown-menu .ah-dropdown-item {
        justify-content: center;
    }
}

/* Header scroll effect */
.ah-header.scrolled {
    background: rgba(10, 22, 40, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), 0 0 40px rgba(30, 136, 229, 0.1);
    border-bottom-color: rgba(30, 136, 229, 0.35);
}

.ah-header.scrolled .ah-header-logo {
    box-shadow: 0 2px 10px rgba(30, 136, 229, 0.5);
}

.ah-header.scrolled .ah-nav-item {
    padding: 6px 12px;
    font-size: 0.82rem;
}

/* Mobile Menu Toggle */
.ah-header-toggle {
    display: none;
    background: rgba(30, 136, 229, 0.15);
    border: 1px solid rgba(30, 136, 229, 0.25);
    border-radius: 8px;
    padding: 10px 12px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ah-header-toggle:hover {
    background: rgba(30, 136, 229, 0.25);
    color: #ffffff;
}

/* ============================================
   GLASSMORPHISM PANELS
   ============================================ */

.ah-glass-panel {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(30, 136, 229, 0.15);
    border-radius: 16px;
    padding: 24px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ah-glass-panel:hover {
    border-color: rgba(30, 136, 229, 0.25);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(30, 136, 229, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Timer Panel Specific */
.timer-panel {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(30, 136, 229, 0.15);
    border-radius: 20px;
    padding: 30px;
    margin: 20px auto;
    max-width: 500px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Calculator Panel */
.calculator-panel {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(30, 136, 229, 0.15);
    border-radius: 20px;
    padding: 30px;
    margin: 20px auto;
    max-width: 550px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ============================================
   GLASSMORPHISM TABS
   ============================================ */

.tab-navigation {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    padding: 8px;
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 14px;
    border: 1px solid rgba(30, 136, 229, 0.1);
}

.tab-navigation button {
    padding: 12px 20px;
    background: rgba(30, 136, 229, 0.1);
    border: 1px solid rgba(30, 136, 229, 0.2);
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.tab-navigation button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.tab-navigation button:hover:not(:disabled)::before {
    left: 100%;
}

.tab-navigation button:hover:not(:disabled) {
    background: rgba(30, 136, 229, 0.2);
    border-color: rgba(30, 136, 229, 0.4);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.2);
}

.tab-navigation button[aria-selected="true"] {
    background: linear-gradient(135deg, #1e88e5, #42a5f5);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 20px rgba(30, 136, 229, 0.4);
}

.tab-navigation button[aria-selected="true"]::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 1px;
}

.tab-navigation button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================
   GLASSMORPHISM BUTTONS
   ============================================ */

/* Primary Button */
.btn-primary,
.timer-controls .btn-primary {
    background: linear-gradient(135deg, #1e88e5, #42a5f5);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary::before,
.timer-controls .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover:not(:disabled),
.timer-controls .btn-primary:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(30, 136, 229, 0.5);
    background: linear-gradient(135deg, #42a5f5, #64b5f6);
}

.btn-primary:hover:not(:disabled)::before,
.timer-controls .btn-primary:hover:not(:disabled)::before {
    left: 100%;
}

.btn-primary:active:not(:disabled),
.timer-controls .btn-primary:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.btn-primary:disabled,
.timer-controls .btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Secondary Button */
.btn-secondary,
.timer-controls .btn-secondary {
    background: rgba(30, 136, 229, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(30, 136, 229, 0.25);
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover:not(:disabled),
.timer-controls .btn-secondary:hover:not(:disabled) {
    background: rgba(30, 136, 229, 0.25);
    border-color: rgba(30, 136, 229, 0.4);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.2);
}

.btn-secondary:disabled,
.timer-controls .btn-secondary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-calculate:active {
    transform: translateY(0) scale(0.98);
}

/* Settings Button */
.btn-settings {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.3);
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-settings:hover:not(:disabled) {
    background: rgba(100, 116, 139, 0.3);
    border-color: rgba(100, 116, 139, 0.5);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Mode Toggle */
.btn-mode-toggle {
    background: rgba(30, 136, 229, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(30, 136, 229, 0.2);
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-mode-toggle:hover {
    background: rgba(30, 136, 229, 0.2);
    border-color: rgba(30, 136, 229, 0.4);
    color: #ffffff;
}

/* ============================================
   GLASSMORPHISM INPUTS
   ============================================ */

.input-group label {
    color: #94a3b8;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.input-group input,
.input-group select,
.countdown-input-group input {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(30, 136, 229, 0.2);
    border-radius: 10px;
    padding: 14px 16px;
    color: #e2e8f0;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.input-group input:focus,
.input-group select:focus,
.countdown-input-group input:focus {
    outline: none;
    border-color: rgba(30, 136, 229, 0.5);
    box-shadow: 0 0 20px rgba(30, 136, 229, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

.input-group input::placeholder {
    color: #64748b;
}

/* Dropdown styling */
.input-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Time Selects */
.time-selects select {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(30, 136, 229, 0.2);
    border-radius: 8px;
    padding: 10px 12px;
    color: #e2e8f0;
    font-size: 1rem;
}

/* Date Input */
input[type="date"] {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(30, 136, 229, 0.2);
    border-radius: 10px;
    padding: 14px 16px;
    color: #e2e8f0;
    cursor: pointer;
}

input[type="date"]:focus {
    border-color: rgba(30, 136, 229, 0.5);
    box-shadow: 0 0 20px rgba(30, 136, 229, 0.2);
}

/* Range Input */
input[type="range"] {
    -webkit-appearance: none;
    background: rgba(30, 136, 229, 0.2);
    border-radius: 10px;
    height: 8px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #1e88e5, #42a5f5);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(30, 136, 229, 0.4);
}

/* Checkbox */
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #1e88e5;
    cursor: pointer;
}

/* ============================================
   TIMER DISPLAY
   ============================================ */

.timer-display {
    font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
    font-size: 5rem;
    font-weight: bold;
    text-align: center;
    margin: 2rem 0;
    letter-spacing: 0.1em;
    background: linear-gradient(135deg, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.timer-phase {
    font-size: 1.2rem;
    color: #1e88e5;
    margin-bottom: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ============================================
   RESULTS & RECHENWEG
   ============================================ */

.rechenweg {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(30, 136, 229, 0.15);
    border-radius: 12px;
    padding: 20px;
}

.rechenweg-step {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(30, 136, 229, 0.1);
    color: #94a3b8;
}

.rechenweg-step:last-of-type {
    border-bottom: none;
}

.rechenweg-label {
    color: #64748b;
}

.rechenweg-value {
    font-weight: 600;
    color: #e2e8f0;
}

.rechenweg-result {
    display: flex;
    justify-content: space-between;
    padding: 14px 16px;
    margin-top: 10px;
    background: linear-gradient(135deg, #1e88e5, #42a5f5);
    color: white;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.3);
}

.result-highlight {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, #1e88e5, #42a5f5);
    color: white;
    padding: 20px 40px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(30, 136, 229, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-value {
    font-size: 2.5rem;
    font-weight: bold;
    font-family: 'JetBrains Mono', monospace;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.result-unit {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 4px;
}

/* ============================================
   HISTORY & CALENDAR
   ============================================ */

.history-calendar {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(30, 136, 229, 0.15);
    border-radius: 16px;
    padding: 20px;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 10px;
    color: #64748b;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    position: relative;
    border: 1px solid rgba(30, 136, 229, 0.1);
    color: #94a3b8;
}

.calendar-day:hover {
    background: rgba(30, 136, 229, 0.2);
    border-color: rgba(30, 136, 229, 0.3);
    color: #ffffff;
    transform: scale(1.05);
}

.calendar-day.today {
    border: 2px solid #1e88e5;
    box-shadow: 0 0 15px rgba(30, 136, 229, 0.3);
}

.calendar-day.selected {
    background: linear-gradient(135deg, #1e88e5, #42a5f5);
    color: white;
    border-color: transparent;
}

.history-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
    padding: 16px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(30, 136, 229, 0.15);
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e88e5;
    text-shadow: 0 0 20px rgba(30, 136, 229, 0.3);
}

.stat-label {
    font-size: 0.85rem;
    color: #64748b;
}

/* ============================================
   SETTINGS & MODAL
   ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(30, 136, 229, 0.2);
    padding: 30px;
    border-radius: 20px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #e2e8f0;
    font-size: 1.3rem;
}

.settings-group {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(30, 136, 229, 0.1);
}

.setting-item:last-child {
    border-bottom: none;
}

.settings-section-title {
    font-size: 1rem;
    margin-top: 20px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(30, 136, 229, 0.2);
    color: #1e88e5;
    font-weight: 600;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
    .ah-header-toggle {
        display: block;
    }

    .ah-header-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        padding-bottom: 10px;
    }

    .ah-header-nav.active {
        display: flex;
    }

    .ah-header-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .ah-nav-item {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .ah-header-title h1 {
        font-size: 1.1rem;
    }

    .ah-header-tagline {
        display: none;
    }

    .timer-display {
        font-size: 3rem;
        padding: 15px;
    }

    .tab-navigation {
        gap: 4px;
        padding: 6px;
    }

    .tab-navigation button{
        padding: 12px 16px;
        font-size: 0.85rem;
        min-height: 48px; /* TOUCH TARGET FIX */
    }

    .timer-controls {
        flex-direction: column;
        gap: 8px;
    }

    .timer-controls button{
        width: 100%;
        min-height: 48px; /* TOUCH TARGET FIX */
        padding: 12px 20px;
    }

    .calculator-panel,
    .timer-panel {
        padding: 20px;
        margin: 15px 10px;
    }

    .btn-calculate {
        padding: 14px 24px;
        font-size: 1rem;
        min-height: 48px; /* TOUCH TARGET FIX */
    }

    .history-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .result-value {
        font-size: 2rem;
    }

    .result-highlight {
        padding: 15px 25px;
    }

    /* Touch target enforcement for all interactive elements */
    .btn-primary,
    .btn-secondary,
    .btn-settings,
    .btn-mode-toggle,
    .btn-share {
        min-height: 48px;
        min-width: 48px;
    }

    .ah-nav-item {
        min-height: 48px;
        padding: 12px 16px;
    }

    .input-group input,
    .input-group select {
        min-height: 48px;
    }

    .ah-footer-social a {
        width: 48px;
        height: 48px;
    }

    .ah-footer-links a {
        display: block;
        padding: 12px 0;
        min-height: 48px;
    }

    .ah-footer-bottom-links a {
        min-height: 48px;
        display: inline-flex;
        align-items: center;
    }

    .calendar-day {
        min-height: 40px; /* Calendar cells slightly smaller but still tappable */
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(30, 136, 229, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(30, 136, 229, 0.5);
    }
}

.timer-display.running {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Lap List */
.lap-list {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(30, 136, 229, 0.15);
    border-radius: 12px;
    max-height: 200px;
    overflow-y: auto;
}

.lap-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(30, 136, 229, 0.1);
    color: #94a3b8;
}

.lap-item:last-child {
    border-bottom: none;
}

.lap-number {
    color: #1e88e5;
    font-weight: 600;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn-share {
    background: rgba(30, 136, 229, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(30, 136, 229, 0.25);
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-share:hover {
    background: rgba(30, 136, 229, 0.25);
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-share.copied {
    background: linear-gradient(135deg, #10b981, #34d399);
    border-color: transparent;
    color: white;
}

/* Error States */
.rechenweg-error {
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 16px;
    border-radius: 12px;
}

.error-message {
    color: #f87171;
    font-size: 0.875rem;
}

/* ============================================
   TOUCH TARGET BASELINE (all viewports)
   WCAG 2.1 / Google minimum: 48x48px
   ============================================ */

button,
.btn-primary,
.btn-secondary,
.btn-settings,
.btn-calculate,
.btn-share,
.btn-mode-toggle,
.tab-navigation button,
.ah-nav-item,
.pg-nav-item,
input[type="submit"],
input[type="button"],
input[type="text"],
input[type="number"],
input[type="email"],
input[type="date"],
select,
[role="button"] {
    min-height: 44px;
}

table,
table:not([role]),
table:not([class]) {
    background: rgba(30, 41, 59, 0.5) !important;
    border-collapse: collapse !important;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(30, 136, 229, 0.15) !important;
    color: #cbd5e1 !important;
}

thead {
    background: rgba(15, 23, 42, 0.7) !important;
}

th,
table th,
thead th {
    background: rgba(15, 23, 42, 0.7) !important;
    color: #e2e8f0 !important;
    font-weight: 600 !important;
    font-size: 0.9rem;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 2px solid rgba(30, 136, 229, 0.3) !important;
}

td,
table td,
tbody td {
    background: rgba(30, 41, 59, 0.3) !important;
    color: #cbd5e1 !important;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(30, 136, 229, 0.1) !important;
    font-size: 0.9rem;
}

tbody tr {
    transition: background 0.2s ease;
}

tbody tr:hover,
tbody tr:nth-child(even) {
    background: rgba(30, 136, 229, 0.08) !important;
}

tbody tr:hover td {
    background: rgba(30, 136, 229, 0.12) !important;
}

tbody tr:last-child td {
    border-bottom: none !important;
}
/**
 * Accessibility Fixes for Dark Theme
 * Ensures all text has proper contrast on dark backgrounds
 * WCAG 2.1 AA minimum contrast ratio: 4.5:1
 */

/* ============================================
   ROOT VARIABLES - DARK THEME
   ============================================ */

:root {
    /* Text colors for dark background */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #60a5fa;
    --text-error: #fca5a5;
    --text-success: #86efac;

    /* Background adjustments */
    --bg-primary: rgba(30, 41, 59, 0.6);
    --bg-secondary: rgba(15, 23, 42, 0.8);
    --bg-input: rgba(15, 23, 42, 0.6);

    /* Border colors */
    --border-primary: rgba(59, 130, 246, 0.3);
    --border-secondary: rgba(71, 85, 105, 0.4);
}

/* ============================================
   GLOBAL TEXT FIXES
   ============================================ */

/* Body text */
body {
    color: var(--text-primary) !important;
}

/* All paragraphs */
p, span, div:not(.timer-display):not(.result-value) {
    color: var(--text-primary);
}

/* All labels */
label {
    color: var(--text-secondary) !important;
}

/* Links */
a {
    color: var(--text-accent);
}

a:hover {
    color: #93c5fd;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

/* ============================================
   TAB NAVIGATION - DARK THEME
   ============================================ */

.tab-navigation button {
    color: var(--text-secondary) !important;
    border-color: var(--border-primary) !important;
    background: rgba(30, 136, 229, 0.1) !important;
}

.tab-navigation button:hover:not(:disabled) {
    background: rgba(30, 136, 229, 0.2) !important;
    color: var(--text-primary) !important;
}

.tab-navigation button[aria-selected="true"] {
    background: linear-gradient(135deg, #1e88e5, #42a5f5) !important;
    color: white !important;
    border-color: transparent !important;
}

/* ============================================
   INPUT FIELDS - DARK THEME
   ============================================ */

.input-group label,
.calculator-input-area label,
.countdown-input-group label {
    color: var(--text-secondary) !important;
}

.input-group input,
.input-group select,
.calculator-panel input,
.calculator-panel select,
.countdown-input-group input,
.dreisatz-row input,
input[type="text"],
input[type="number"],
input[type="date"],
select {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-primary) !important;
    color: var(--text-primary) !important;
}

.input-group input::placeholder,
input::placeholder {
    color: var(--text-muted) !important;
}

.input-group input:focus,
.input-group select:focus,
input:focus,
select:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3) !important;
    outline: none;
}

/* Select dropdown arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
}

/* ============================================
   BUTTONS - DARK THEME
   ============================================ */

/* Primary buttons */
.btn-primary,
.timer-controls .btn-primary {
    background: linear-gradient(135deg, #1e88e5, #42a5f5) !important;
    color: white !important;
}

/* Secondary buttons */
.btn-secondary,
.timer-controls .btn-secondary {
    background: rgba(30, 136, 229, 0.15) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-primary) !important;
}

.btn-secondary:hover:not(:disabled),
.timer-controls .btn-secondary:hover:not(:disabled) {
    background: rgba(30, 136, 229, 0.25) !important;
    color: var(--text-primary) !important;
}

/* Settings button */
.btn-settings,
.btn-mode-toggle {
    background: rgba(100, 116, 139, 0.2) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-secondary) !important;
}

.btn-settings:hover:not(:disabled),
.btn-mode-toggle:hover {
    background: rgba(100, 116, 139, 0.3) !important;
    color: var(--text-primary) !important;
}

/* Calculate button */
.btn-calculate {
    color: white !important;
}

/* ============================================
   TIMER DISPLAY - DARK THEME
   ============================================ */

.timer-display {
    color: var(--text-primary) !important;
    border: 1px solid var(--border-primary) !important;
}

.timer-phase {
    color: var(--text-accent) !important;
}

.session-count {
    color: var(--text-secondary) !important;
}

/* ============================================
   RECHENWEG - DARK THEME
   ============================================ */

.rechenweg {
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-primary) !important;
}

.rechenweg-step {
    border-bottom-color: var(--border-secondary) !important;
}

.rechenweg-label {
    color: var(--text-secondary) !important;
}

.rechenweg-value {
    color: var(--text-primary) !important;
}

.rechenweg-result {
    background: linear-gradient(135deg, #1e88e5, #42a5f5) !important;
}

.rechenweg-error {
    color: var(--text-error) !important;
    background: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

.error-message {
    color: var(--text-error) !important;
}

/* ============================================
   RESULTS - DARK THEME
   ============================================ */

.result-highlight {
    background: linear-gradient(135deg, #1e88e5, #42a5f5) !important;
    color: white !important;
}

.result-details {
    color: var(--text-secondary) !important;
}

.result-placeholder {
    background: linear-gradient(135deg, #1e88e5, #42a5f5) !important;
    color: white !important;
}

/* ============================================
   DREISATZ - DARK THEME
   ============================================ */

.dreisatz-input {
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-primary) !important;
}

.dreisatz-row span {
    color: var(--text-secondary) !important;
}

.dreisatz-type label,
.radio-group label {
    color: var(--text-secondary) !important;
}

/* ============================================
   VAT RESULTS - DARK THEME
   ============================================ */

.vat-results {
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-primary) !important;
}

.vat-result-item {
    border-bottom-color: var(--border-secondary) !important;
}

.vat-result-label {
    color: var(--text-secondary) !important;
}

.vat-result-value {
    color: var(--text-primary) !important;
}

/* ============================================
   MWST PRESETS - DARK THEME
   ============================================ */

.mwst-preset {
    background: rgba(30, 136, 229, 0.1) !important;
    border: 1px solid var(--border-primary) !important;
    color: var(--text-secondary) !important;
}

.mwst-preset:hover {
    background: rgba(30, 136, 229, 0.2) !important;
    color: var(--text-primary) !important;
}

.mwst-preset.active {
    background: linear-gradient(135deg, #1e88e5, #42a5f5) !important;
    color: white !important;
    border-color: transparent !important;
}

/* ============================================
   LAP LIST - DARK THEME
   ============================================ */

.lap-list {
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-primary) !important;
}

.lap-item {
    border-bottom-color: var(--border-secondary) !important;
    color: var(--text-primary) !important;
}

.lap-number {
    color: var(--text-accent) !important;
}

.lap-time {
    color: var(--text-primary) !important;
}

.total-time {
    color: var(--text-muted) !important;
}

/* ============================================
   HISTORY PANEL - DARK THEME
   ============================================ */

.history-header h3 {
    color: var(--text-primary) !important;
}

#history-month-display {
    color: var(--text-primary) !important;
}

.calendar-header span {
    color: var(--text-muted) !important;
}

.calendar-day {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-secondary) !important;
    color: var(--text-secondary) !important;
}

.calendar-day:hover {
    background: rgba(30, 136, 229, 0.3) !important;
    color: var(--text-primary) !important;
}

.calendar-day.selected,
.calendar-day.today {
    background: linear-gradient(135deg, #1e88e5, #42a5f5) !important;
    color: white !important;
    border-color: transparent !important;
}

.stat-item {
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-primary) !important;
}

.stat-value {
    color: var(--text-accent) !important;
}

.stat-label {
    color: var(--text-muted) !important;
}

.history-day-detail {
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-primary) !important;
}

.history-day-detail h4 {
    color: var(--text-primary) !important;
}

.history-list li {
    border-bottom-color: var(--border-secondary) !important;
    color: var(--text-primary) !important;
}

.history-trash li {
    background: rgba(239, 68, 68, 0.1) !important;
    color: var(--text-primary) !important;
}

/* ============================================
   SETTINGS PANEL - DARK THEME
   ============================================ */

.settings-section-title {
    color: var(--text-accent) !important;
    border-bottom-color: var(--border-primary) !important;
}

.settings-group {
    background: var(--bg-secondary) !important;
    border-radius: 12px;
    padding: 16px;
}

.setting-item label {
    color: var(--text-secondary) !important;
}

.setting-item small {
    color: var(--text-muted) !important;
}

/* ============================================
   MODAL - DARK THEME
   ============================================ */

.modal-overlay {
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(8px);
}

.modal-content {
    background: rgba(30, 41, 59, 0.95) !important;
    border: 1px solid var(--border-primary) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
}

.modal-content h3 {
    color: var(--text-primary) !important;
}

.form-group label {
    color: var(--text-secondary) !important;
}

.form-group input {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-primary) !important;
    color: var(--text-primary) !important;
}

/* ============================================
   SHARE BUTTONS - DARK THEME
   ============================================ */

.btn-share {
    background: rgba(30, 136, 229, 0.1) !important;
    border: 1px solid var(--border-primary) !important;
    color: var(--text-secondary) !important;
}

.btn-share:hover {
    background: rgba(30, 136, 229, 0.2) !important;
    color: var(--text-primary) !important;
}

.btn-share.copied {
    background: linear-gradient(135deg, #10b981, #34d399) !important;
    color: white !important;
    border-color: transparent !important;
}

/* ============================================
   RELATED CALCULATORS - DARK THEME
   ============================================ */

.related-calculators {
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-primary) !important;
}

.related-calculators h3 {
    color: var(--text-accent) !important;
}

.related-calculators a {
    background: rgba(30, 136, 229, 0.1) !important;
    border: 1px solid var(--border-primary) !important;
    color: var(--text-primary) !important;
}

.related-calculators a:hover {
    background: rgba(30, 136, 229, 0.2) !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
}

.related-calculators a small {
    color: var(--text-muted) !important;
}

/* ============================================
   SEO TEXT CONTAINER - DARK THEME
   ============================================ */

.seo-text-container {
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-primary) !important;
    color: var(--text-secondary) !important;
}

.seo-text-container strong {
    color: var(--text-accent) !important;
}

/* ============================================
   CROSS CALCULATOR LINKS - DARK THEME
   ============================================ */

.cross-calculator-links {
    background: rgba(251, 191, 36, 0.08) !important;
    border: 1px solid rgba(251, 191, 36, 0.2) !important;
}

.cross-calculator-links h4 {
    color: #fbbf24 !important;
}

.cross-calculator-links a {
    background: rgba(30, 136, 229, 0.1) !important;
    border: 1px solid var(--border-primary) !important;
    color: var(--text-secondary) !important;
}

.cross-calculator-links a:hover {
    background: rgba(30, 136, 229, 0.2) !important;
    color: var(--text-primary) !important;
}

/* ============================================
   INPUT HINTS - DARK THEME
   ============================================ */

.input-hint {
    color: var(--text-muted) !important;
}

/* ============================================
   SECTION TITLES - DARK THEME
   ============================================ */

.section-title {
    color: var(--text-secondary) !important;
}

.section-separator {
    border-top-color: var(--border-primary) !important;
}

/* ============================================
   COMING SOON TEXT
   ============================================ */

.coming-soon {
    color: var(--text-muted) !important;
}

/* ============================================
   TIME SEPARATOR
   ============================================ */

.time-separator {
    color: var(--text-secondary) !important;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 600px) {
    .timer-display {
        color: var(--text-primary) !important;
    }
}

/* ============================================
   PRINT STYLES - LIGHT FOR PRINTING
   ============================================ */

@media print {
    body {
        background: white !important;
        color: #1e293b !important;
    }

    * {
        color: #1e293b !important;
        background: white !important;
        border-color: #e2e8f0 !important;
    }

    .result-highlight {
        background: #1e88e5 !important;
        color: white !important;
    }

    .btn-primary,
    .btn-calculate {
        background: #1e88e5 !important;
        color: white !important;
    }
}

/* ============================================
   FOOTER TEXT CONTRAST FIX
   Dark background = white text
   ============================================ */

.ah-footer-links a {
    color: #e2e8f0 !important;
}

.ah-footer-links a:hover {
    color: #ffffff !important;
}

.ah-footer-contact p,
.ah-footer-legal p {
    color: #cbd5e1 !important;
}

.ah-footer-copyright {
    color: #94a3b8 !important;
}

.ah-footer-bottom-links a {
    color: #e2e8f0 !important;
}

.ah-footer-bottom-links a:hover{
    color: #ffffff !important;
}

/* Remove the dark mode media query overrides - we use dark by default now */
@media (prefers-color-scheme: dark){
    .ah-footer-links a {
        color: #e2e8f0 !important;
    }

    .ah-footer-contact p,
    .ah-footer-legal p {
        color: #cbd5e1 !important;
    }

    .ah-footer-copyright {
        color: #94a3b8 !important;
    }
}

/* ============================================
   COOKIE CONSENT POPUP - DARK THEME
   Override vanilla-cookieconsent CDN styles
   ============================================ */

/* Main consent modal */
#cc--main .cc__dialog,
.cc_dialog,
.cc-consent-modal {
    background: rgba(30, 41, 59, 0.98) !important;
    color: #f1f5f9 !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
}

/* Consent modal title */
#cc--main .cc__title,
.cc__title,
.cc-consent-modal h1,
.cc-consent-modal h2,
.cc-consent-modal .cc__title {
    color: #ffffff !important;
}

/* Consent modal description */
#cc--main .cc__desc,
.cc__desc,
.cc-consent-modal p,
.cc-consent-modal .cc__desc {
    color: #cbd5e1 !important;
}

/* Consent modal links */
#cc--main .cc__desc a,
.cc__desc a,
.cc-consent-modal a {
    color: #60a5fa !important;
}

#cc--main .cc__desc a:hover,
.cc__desc a:hover,
.cc-consent-modal a:hover{
    color: #93c5fd !important;
}

/* Settings modal */
#cc--main .cm,
.cm,
.cc-settings-modal,
.cc-settings-view {
    background: rgba(30, 41, 59, 0.98) !important;
    color: #f1f5f9 !important;
}

/* Settings sections */
#cc--main .cm__section,
.cm__section,
.cc-settings-section {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
}

#cc--main .cm__section-title,
.cm__section-title,
.cc-settings-section h3,
.cc-settings-section .section-title {
    color: #ffffff !important;
}

#cc--main .cm__section-desc,
.cm__section-desc,
.cc-settings-section p,
.cc-settings-section .section-desc {
    color: #94a3b8 !important;
}

/* Buttons */
#cc--main .cc__btn,
.cc__btn,
.cc-btn {
    color: #ffffff !important;
}

#cc--main .cc__btn--primary,
.cc__btn--primary,
.cc-btn-primary {
    background: linear-gradient(135deg, #1e88e5, #42a5f5) !important;
    color: #ffffff !important;
}

#cc--main .cc__btn--secondary,
.cc__btn--secondary,
.cc-btn-secondary {
    background: rgba(30, 136, 229, 0.15) !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
}

/* Toggle switches */
#cc--main .cm__toggle,
.cm__toggle,
.cc-toggle {
    background: rgba(71, 85, 105, 0.4) !important;
}

#cc--main .cm__toggle--active,
.cm__toggle--active,
.cc-toggle.active {
    background: linear-gradient(135deg, #1e88e5, #42a5f5) !important;
}

/* Cookie table */
#cc--main .cm__cookie-table,
.cm__cookie-table,
.cc-cookie-table {
    color: #cbd5e1 !important;
}

#cc--main .cm__cookie-table th,
.cm__cookie-table th,
.cc-cookie-table th {
    color: #ffffff !important;
    background: rgba(15, 23, 42, 0.8) !important;
}

#cc--main .cm__cookie-table td,
.cm__cookie-table td,
.cc-cookie-table td {
    color: #94a3b8 !important;
    border-bottom-color: rgba(71, 85, 105, 0.3) !important;
}
/**
 * Premium Glassmorphism Footer
 * E-E-A-T optimized for Google
 * Dark theme with blue accent colors
 */

/* Footer Base - Premium Glassmorphism */
.ah-footer {
    background: linear-gradient(135deg,
        rgba(30, 136, 229, 0.08) 0%,
        rgba(30, 60, 114, 0.05) 50%,
        rgba(30, 136, 229, 0.08) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(30, 136, 229, 0.2);
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

/* Premium animated gradient line at top */
.ah-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(30, 136, 229, 0.6),
        rgba(96, 165, 250, 0.4),
        rgba(30, 136, 229, 0.6),
        transparent
    );
    animation: footerGlow 4s ease-in-out infinite;
    z-index: 2;
}

@keyframes footerGlow {
    0%, 100% {
        opacity: 0.4;
        transform: scaleX(0.7);
    }
    50% {
        opacity: 0.8;
        transform: scaleX(1);
    }
}

.ah-footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 20px 30px;
    position: relative;
    z-index: 1;
}

/* Trust Badges */
.ah-footer-badges {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    padding: 25px 20px;
    background: rgba(30, 136, 229, 0.06);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    border: 1px solid rgba(30, 136, 229, 0.15);
}

.ah-footer-badge {
    background: linear-gradient(135deg, #1e88e5, #42a5f5);
    color: white;
    padding: 12px 22px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ah-footer-badge-de {
    gap: 6px;
}

.de-flag-svg {
    flex-shrink: 0;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.ah-footer-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.ah-footer-badge:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 30px rgba(30, 136, 229, 0.45);
    background: linear-gradient(135deg, #42a5f5, #64b5f6);
}

.ah-footer-badge:hover::before {
    left: 100%;
}

/* Footer Grid */
.ah-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 35px;
    margin-bottom: 35px;
}

/* Footer Sections - Premium Card Style */
.ah-footer-section {
    position: relative;
    background: rgba(30, 136, 229, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(30, 136, 229, 0.12);
    border-radius: 14px;
    padding: 22px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* Premium shimmer effect */
.ah-footer-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.02),
        transparent
    );
    transition: left 0.8s ease;
    pointer-events: none;
}

.ah-footer-section:hover::before {
    left: 100%;
}

.ah-footer-section:hover {
    background: rgba(30, 136, 229, 0.1);
    border-color: rgba(30, 136, 229, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(30, 136, 229, 0.15);
}

.ah-footer-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #1e88e5, #42a5f5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    color: #1e88e5;
}

.ah-footer-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 35px;
    height: 3px;
    background: linear-gradient(135deg, #1e88e5, #42a5f5);
    border-radius: 2px;
}

/* Footer Links */
.ah-footer-links {
    list-style: none !important;
    padding: 0;
    margin: 0;
}

.ah-footer-links li {
    list-style: none !important;
    margin-bottom: 10px;
    position: relative;
    padding-left: 18px;
}

.ah-footer-links li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #60a5fa;
    font-size: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.ah-footer-links a {
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    background: linear-gradient(135deg, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ah-footer-links a:hover {
    color: #60a5fa;
    padding-left: 6px;
}

.ah-footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #1e88e5, #42a5f5);
    transition: width 0.3s ease;
}

.ah-footer-links a:hover::after {
    width: 100%;
}

/* Contact Section */
.ah-footer-contact {
    background: rgba(30, 136, 229, 0.08);
    border-radius: 10px;
    padding: 16px;
    margin-top: 16px;
}

.ah-footer-contact p {
    margin: 6px 0;
    font-weight: 500;
    font-size: 14px;
    background: linear-gradient(135deg, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ah-footer-contact strong {
    background: linear-gradient(135deg, #60a5fa, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Legal Section */
.ah-footer-legal {
    background: rgba(30, 60, 114, 0.06);
    border-radius: 10px;
    padding: 16px;
    margin-top: 16px;
}

.ah-footer-legal p {
    margin: 6px 0;
    font-weight: 500;
    font-size: 14px;
    background: linear-gradient(135deg, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ah-footer-legal strong {
    background: linear-gradient(135deg, #60a5fa, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Social Links */
.ah-footer-social {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.ah-footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #1e88e5, #42a5f5);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.25);
}

.ah-footer-social a:hover {
    transform: translateY(-2px) scale(1.08);
    box-shadow: 0 8px 20px rgba(30, 136, 229, 0.35);
    background: linear-gradient(135deg, #42a5f5, #64b5f6);
}

/* Footer Bottom */
.ah-footer-bottom {
    border-top: 1px solid rgba(30, 136, 229, 0.15);
    text-align: center;
    background: rgba(30, 136, 229, 0.03);
    border-radius: 12px;
    margin-top: 30px;
    padding: 25px 22px;
}

.ah-footer-bottom p {
    color: #ffffff;
}

.ah-footer-bottom-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 18px;
}

.ah-footer-bottom-links a {
    text-decoration: none;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(30, 136, 229, 0.06);
    transition: all 0.3s ease;
    border: 1px solid rgba(30, 136, 229, 0.15);
    font-size: 14px;
    background-image: linear-gradient(135deg, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
}

.ah-footer-bottom-links a {
    background-color: rgba(30, 136, 229, 0.06);
}

.ah-footer-bottom-links a:hover {
    background-color: rgba(30, 136, 229, 0.12);
    -webkit-text-fill-color: #60a5fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.15);
}

.ah-footer-copyright {
    font-size: 13px;
    margin-top: 16px;
    font-weight: 500;
    background: linear-gradient(135deg, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ah-footer-copyright p {
    margin: 4px 0;
    background: linear-gradient(135deg, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ah-footer-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .ah-footer-container {
        padding: 30px 15px 20px;
    }

    .ah-footer-bottom-links {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .ah-footer-social {
        justify-content: center;
    }

    .ah-footer-badges {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        margin-bottom: 30px;
        padding: 20px 15px;
    }

    .ah-footer-badge {
        width: 100%;
        max-width: 260px;
        justify-content: center;
        margin: 0 auto;
        font-size: 13px;
        padding: 10px 18px;
    }
}

/* Dark Mode Enhancement */
@media (prefers-color-scheme: dark) {
    .ah-footer {
        background: linear-gradient(135deg,
            rgba(30, 136, 229, 0.12) 0%,
            rgba(30, 60, 114, 0.08) 50%,
            rgba(30, 136, 229, 0.12) 100%);
    }

    .ah-footer-links a {
        color: #ffffff;
    }

    .ah-footer-contact p,
    .ah-footer-legal p {
        color: #e2e8f0;
    }

    .ah-footer-copyright {
        color: #ffffff;
    }
}

/* ============================================
   REDUCED MOTION SUPPORT
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .ah-footer::before,
    .ah-footer-section::before,
    .ah-footer-badge::before {
        animation: none;
    }

    .ah-footer-section,
    .ah-footer-badge,
    .ah-footer-social a,
    .ah-footer-bottom-links a {
        transition-duration: 0.2s;
    }
}
/**
 * Mobile Responsive Fixes - 320px Baseline
 * For Arbeitszeit Helden
 *
 * Purpose: Ensure AdSense mobile-friendly compliance
 * - Prevents horizontal scroll (overflow-x: hidden)
 * - Enforces 48x48px minimum touch targets
 * - Optimizes layout for 320px viewport (iPhone SE)
 *
 * Load after: glassmorphism.css, main.css, footer.css
 */

/* ============================================
   OVERFLOW PROTECTION
   Prevents horizontal scroll on all viewports
   ============================================ */

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Safe container width */
main.container,
.timer-panel,
.calculator-panel,
.ah-glass-panel,
.history-calendar,
.modal-content {
    max-width: 100%;
    box-sizing: border-box;
}

/* Ensure box-sizing globally */
*, *::before, *::after {
    box-sizing: border-box;
}

/* ============================================
   320px BASELINE (iPhone SE, small Android)
   ============================================ */

@media (max-width: 359px) {
    /* Timer display readable */
    .timer-display {
        font-size: 2.5rem;
        padding: 12px;
        letter-spacing: 0.05em;
    }

    /* Tab buttons: full-width, meet 48px height */
    .tab-navigation {
        gap: 3px;
        padding: 6px;
    }

    .tab-navigation button {
        padding: 10px 12px;
        font-size: 0.75rem;
        min-height: 48px;
        flex: 1 1 calc(50% - 4px); /* 2 per row */
        min-width: 0;
    }

    /* Timer controls stack vertically, full-width */
    .timer-controls {
        flex-direction: column;
        gap: 6px;
    }

    .timer-controls button {
        width: 100%;
        min-height: 48px;
        padding: 12px 16px;
    }

    /* Calculator panel padding reduction */
    .calculator-panel,
    .timer-panel {
        padding: 16px;
        margin: 10px 8px;
        border-radius: 12px;
    }

    /* Result display */
    .result-value {
        font-size: 1.75rem;
    }

    .result-highlight {
        padding: 12px 20px;
    }

    /* Calendar grid compact */
    .calendar-header span {
        font-size: 0.65rem;
    }

    .calendar-day {
        font-size: 0.7rem;
        min-height: 36px;
    }

    .calendar-day .activity-dot {
        width: 3px;
        height: 3px;
    }

    /* Header compact */
    .ah-header-title h1 {
        font-size: 1rem;
    }

    .ah-header-tagline {
        display: none;
    }

    /* History stats stack */
    .history-stats {
        grid-template-columns: 1fr;
    }

    /* Settings inputs full-width */
    .setting-item input[type="number"],
    .setting-item input[type="range"] {
        width: 100%;
    }

    /* Modal full-width */
    .modal-content {
        width: 95%;
        padding: 16px;
        margin: 10px;
    }

    /* Input fields 48px height */
    .input-group input,
    .input-group select,
    .time-selects select {
        min-height: 48px;
        padding: 12px;
    }

    /* Buttons minimum touch target */
    .btn-primary,
    .btn-secondary,
    .btn-settings,
    .btn-calculate {
        min-height: 48px;
        padding: 12px 20px;
    }

    /* Footer badges stack */
    .ah-footer-badges {
        flex-direction: column;
        gap: 8px;
    }

    .ah-footer-badge {
        width: 100%;
        max-width: none;
        justify-content: center;
    }

    /* Footer grid single column */
    .ah-footer-grid {
        grid-template-columns: 1fr;
    }
}
/**
 * Premium Agentic Container Components
 * Enterprise-grade UI components for calculator modules
 * Pure CSS implementation (no React/TypeScript required)
 * Inspired by 21st.dev and modern design systems
 */

/* ============================================
   ROOT VARIABLES - PREMIUM DESIGN TOKENS
   ============================================ */
:root {
    /* Premium Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 40px rgba(30, 136, 229, 0.15);
    --shadow-glow-lg: 0 0 60px rgba(30, 136, 229, 0.2);

    /* Premium Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-2xl: 28px;

    /* Animation Timing */
    --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

    /* Glow Colors */
    --glow-primary: rgba(30, 136, 229, 0.4);
    --glow-secondary: rgba(96, 165, 250, 0.3);
    --glow-accent: rgba(255, 107, 53, 0.3);
}

/* ============================================
   PREMIUM TYPOGRAPHY SETUP
   Enterprise-grade font rendering
   ============================================ */

/* Optimize font rendering */
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1, "liga" 1;
}

/* Premium body typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'Helvetica Neue', Arial, sans-serif;
    font-variation-settings: 'wght' 400;
    letter-spacing: -0.01em;
    line-height: 1.6;
}

/* Headings with better spacing */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

/* Monospace for calculator values */
.font-mono, .result-value, .rechenweg-value, input[type="text"], input[type="number"] {
    font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-variant-numeric: tabular-nums;
}

/* ============================================
   AGENTIC CONTAINER - MAIN PANEL
   Premium glass container with glow effect
   ============================================ */

.agentic-container {
    position: relative;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 2rem;
    overflow: hidden;
    transition: all 0.4s var(--ease-premium);
}

/* Animated glow border */
.agentic-container::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(
        135deg,
        rgba(30, 136, 229, 0.5) 0%,
        rgba(96, 165, 250, 0.3) 25%,
        rgba(30, 136, 229, 0.1) 50%,
        rgba(96, 165, 250, 0.3) 75%,
        rgba(30, 136, 229, 0.5) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.6;
    transition: opacity 0.4s ease;
    animation: borderRotate 8s linear infinite;
}

@keyframes borderRotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.agentic-container:hover::before {
    opacity: 1;
}

/* Inner glow effect */
.agentic-container::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(30, 136, 229, 0.08) 0%,
        transparent 50%
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.agentic-container:hover::after {
    opacity: 1;
}

/* Content wrapper to ensure proper z-index */
.agentic-container > * {
    position: relative;
    z-index: 1;
}

/* ============================================
   PREMIUM CALCULATOR PANEL
   Enhanced glassmorphism calculator
   ============================================ */

.premium-calculator-panel {
    position: relative;
    background: linear-gradient(
        135deg,
        rgba(30, 41, 59, 0.7) 0%,
        rgba(30, 41, 59, 0.5) 100%
    );
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(30, 136, 229, 0.2);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin: 1.5rem auto;
    max-width: 580px;
    box-shadow:
        var(--shadow-2xl),
        var(--shadow-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.4s var(--ease-premium);
}

.premium-calculator-panel:hover {
    border-color: rgba(30, 136, 229, 0.35);
    box-shadow:
        var(--shadow-2xl),
        var(--shadow-glow-lg),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

/* Shimmer effect on hover */
.premium-calculator-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.03),
        transparent
    );
    transition: left 0.8s ease;
    pointer-events: none;
}

.premium-calculator-panel:hover::before {
    left: 100%;
}

/* ============================================
   PREMIUM INPUT STYLING
   Enterprise-grade form inputs
   ============================================ */

.premium-input-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.premium-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #94a3b8;
    letter-spacing: 0.01em;
}

.premium-input-group input,
.premium-input-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(30, 136, 229, 0.25);
    border-radius: var(--radius-md);
    color: #e2e8f0;
    font-size: 1rem;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.3s var(--ease-smooth);
}

.premium-input-group input:hover,
.premium-input-group select:hover {
    border-color: rgba(30, 136, 229, 0.4);
    background: rgba(15, 23, 42, 0.8);
}

.premium-input-group input:focus,
.premium-input-group select:focus {
    outline: none;
    border-color: rgba(30, 136, 229, 0.6);
    box-shadow:
        0 0 0 3px rgba(30, 136, 229, 0.15),
        0 0 20px rgba(30, 136, 229, 0.1);
    background: rgba(15, 23, 42, 0.9);
}

.premium-input-group input::placeholder {
    color: #64748b;
}

/* Input hint text */
.premium-input-group .input-hint {
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: #64748b;
    font-family: 'Inter', sans-serif;
}

/* ============================================
   PREMIUM BUTTON STYLING
   High-quality interactive buttons
   ============================================ */

.premium-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s var(--ease-premium);
    overflow: hidden;
}

/* Primary Calculate Button */
.premium-btn-calculate {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e88e5 100%);
    color: white;
    border: none;
    box-shadow:
        0 4px 15px rgba(30, 136, 229, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.premium-btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 25px rgba(255, 107, 53, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.premium-btn-calculate:active {
    transform: translateY(0);
    box-shadow:
        0 2px 10px rgba(255, 107, 53, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Shimmer effect */
.premium-btn-calculate::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.25),
        transparent
    );
    transition: left 0.5s ease;
}

.premium-btn-calculate:hover::before {
    left: 100%;
}

/* Secondary/Share Buttons */
.premium-btn-secondary {
    background: rgba(30, 136, 229, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(30, 136, 229, 0.25);
}

.premium-btn-secondary:hover {
    background: rgba(30, 136, 229, 0.25);
    color: #ffffff;
    border-color: rgba(30, 136, 229, 0.4);
    transform: translateY(-1px);
}

/* ============================================
   PREMIUM RESULT DISPLAY
   Showcase result with premium styling
   ============================================ */

.premium-result {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 3.5rem;
    margin-top: 1.5rem;
    background: linear-gradient(135deg, #1e88e5 0%, #42a5f5 100%);
    border-radius: var(--radius-lg);
    box-shadow:
        0 8px 30px rgba(30, 136, 229, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    animation: resultFadeIn 0.4s var(--ease-premium);
}

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

/* Glow effect behind result */
.premium-result::before {
    content: '';
    position: absolute;
    inset: -4px;
    background: linear-gradient(135deg, #1e88e5, #42a5f5);
    border-radius: inherit;
    filter: blur(20px);
    opacity: 0.4;
    z-index: -1;
    animation: resultGlow 3s ease-in-out infinite;
}

@keyframes resultGlow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.02); }
}

.premium-result-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.75rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.02em;
}

.premium-result-unit {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.25rem;
    letter-spacing: 0.02em;
}

/* ============================================
   PREMIUM RECHENWEG (CALCULATION STEPS)
   Premium calculation step display
   ============================================ */

.premium-rechenweg {
    position: relative;
    margin-top: 1.5rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(30, 136, 229, 0.15);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    animation: rechenwegFadeIn 0.35s var(--ease-premium);
}

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

.premium-rechenweg-step {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(30, 136, 229, 0.1);
    transition: background 0.2s ease;
}

.premium-rechenweg-step:last-of-type {
    border-bottom: none;
}

.premium-rechenweg-step:hover {
    background: rgba(30, 136, 229, 0.05);
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    border-radius: var(--radius-sm);
}

.premium-rechenweg-label {
    color: #94a3b8;
    font-size: 0.9rem;
}

.premium-rechenweg-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: #e2e8f0;
}

/* Final result row */
.premium-rechenweg-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    margin-top: 0.75rem;
    background: linear-gradient(135deg, #1e88e5, #42a5f5);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.3);
}

.premium-rechenweg-result .premium-rechenweg-label,
.premium-rechenweg-result .premium-rechenweg-value {
    color: white;
    font-weight: 600;
}

/* ============================================
   PREMIUM TAB NAVIGATION
   Enterprise tab styling
   ============================================ */

.premium-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.75rem;
    margin-bottom: 1.5rem;
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(30, 136, 229, 0.1);
    border-radius: var(--radius-lg);
}

.premium-tab {
    padding: 0.75rem 1.25rem;
    background: rgba(30, 136, 229, 0.1);
    border: 1px solid rgba(30, 136, 229, 0.2);
    border-radius: var(--radius-md);
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s var(--ease-premium);
}

.premium-tab:hover:not(:disabled) {
    background: rgba(30, 136, 229, 0.2);
    border-color: rgba(30, 136, 229, 0.35);
    color: #ffffff;
    transform: translateY(-1px);
}

.premium-tab[aria-selected="true"],
.premium-tab.active {
    background: linear-gradient(135deg, #1e88e5, #42a5f5);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.35);
}

.premium-tab:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================
   PREMIUM CARD GRID
   For calculator cards and feature displays
   ============================================ */

.premium-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.premium-card {
    position: relative;
    background: linear-gradient(
        135deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(30, 41, 59, 0.4) 100%
    );
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(30, 136, 229, 0.15);
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s var(--ease-premium);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.premium-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(30, 136, 229, 0.1) 0%,
        transparent 50%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
}

.premium-card:hover {
    border-color: rgba(30, 136, 229, 0.35);
    transform: translateY(-4px);
    box-shadow:
        var(--shadow-xl),
        var(--shadow-glow);
}

.premium-card:hover::before {
    opacity: 1;
}

.premium-card-icon {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    display: block;
}

.premium-card h3 {
    color: #60a5fa;
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
}

.premium-card p {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.premium-card-link {
    color: #1e88e5;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ============================================
   PREMIUM SCROLL AREA
   Custom scrollbar with premium styling
   ============================================ */

.premium-scroll-area {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 300px;
    scrollbar-width: thin;
    scrollbar-color: rgba(30, 136, 229, 0.3) rgba(15, 23, 42, 0.3);
}

.premium-scroll-area::-webkit-scrollbar {
    width: 8px;
}

.premium-scroll-area::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.3);
    border-radius: 4px;
}

.premium-scroll-area::-webkit-scrollbar-thumb {
    background: rgba(30, 136, 229, 0.3);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.premium-scroll-area::-webkit-scrollbar-thumb:hover {
    background: rgba(30, 136, 229, 0.5);
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* ============================================
   PREMIUM SHARE BUTTONS
   ============================================ */

.premium-share-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* ============================================
   PREMIUM RELATED SECTION
   ============================================ */

.premium-related {
    margin-top: 3rem;
    padding: 1.75rem;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(30, 136, 229, 0.1);
    border-radius: var(--radius-xl);
}

.premium-related h3 {
    margin: 0 0 1rem 0;
    color: #1e88e5;
    font-size: 1.1rem;
}

.premium-related ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.premium-related a {
    display: block;
    padding: 0.875rem 1rem;
    background: rgba(30, 136, 229, 0.1);
    border: 1px solid rgba(30, 136, 229, 0.15);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: #e2e8f0;
    font-weight: 500;
    transition: all 0.3s ease;
}

.premium-related a:hover {
    background: rgba(30, 136, 229, 0.2);
    border-color: rgba(30, 136, 229, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.15);
}

.premium-related a small {
    display: block;
    color: #64748b;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    font-weight: 400;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .premium-calculator-panel {
        padding: 1.5rem;
        margin: 1rem;
    }

    .premium-result {
        padding: 1.5rem 2.5rem;
    }

    .premium-result-value {
        font-size: 2rem;
    }

    .premium-tabs {
        gap: 0.375rem;
        padding: 0.5rem;
    }

    .premium-tab {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .premium-calculator-panel {
        padding: 1.25rem;
        border-radius: var(--radius-lg);
    }

    .premium-result {
        padding: 1.25rem 2rem;
    }

    .premium-result-value {
        font-size: 1.75rem;
    }

    .premium-card-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   PREMIUM HEADER STYLING
   Sticky header with scroll detection
   ============================================ */

/* Header scroll state - added via JS */
.pg-header.scrolled {
    background: rgba(15, 23, 42, 0.95);
    box-shadow:
        0 4px 30px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(30, 136, 229, 0.1);
    border-bottom-color: rgba(30, 136, 229, 0.3);
}

/* Animated glow line under header on scroll */
.pg-header.scrolled::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(30, 136, 229, 0.6),
        rgba(96, 165, 250, 0.4),
        rgba(30, 136, 229, 0.6),
        transparent
    );
    animation: headerGlow 3s ease-in-out infinite;
}

@keyframes headerGlow {
    0%, 100% {
        opacity: 0.5;
        transform: scaleX(0.8);
    }
    50% {
        opacity: 1;
        transform: scaleX(1);
    }
}

/* Premium header icon animation */
.pg-header-icon {
    position: relative;
    overflow: hidden;
}

.pg-header-icon::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 60%
    );
    transform: rotate(45deg);
    animation: iconShimmer 3s ease-in-out infinite;
}

@keyframes iconShimmer {
    0%, 100% {
        transform: rotate(45deg) translateY(100%);
    }
    50% {
        transform: rotate(45deg) translateY(-100%);
    }
}

/* Premium nav item with active indicator */
.pg-nav-item {
    position: relative;
}

.pg-nav-item.active::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: linear-gradient(135deg, #1e88e5, #42a5f5);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.4);
}

/* Mobile menu toggle animation */
.pg-header-toggle {
    position: relative;
    overflow: hidden;
}

.pg-header-toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(30, 136, 229, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.pg-header-toggle:active::before {
    width: 200%;
    height: 200%;
}

/* Mobile nav animation */
@media (max-width: 768px) {
    .pg-header-nav {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s var(--ease-premium), opacity 0.3s ease;
        opacity: 0;
        padding: 0;
    }

    .pg-header-nav.active {
        max-height: 400px;
        opacity: 1;
        padding: 15px 0;
    }

    .pg-nav-item {
        transform: translateX(-20px);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .pg-header-nav.active .pg-nav-item {
        transform: translateX(0);
        opacity: 1;
    }

    .pg-header-nav.active .pg-nav-item:nth-child(1) { transition-delay: 0.05s; }
    .pg-header-nav.active .pg-nav-item:nth-child(2) { transition-delay: 0.1s; }
    .pg-header-nav.active .pg-nav-item:nth-child(3) { transition-delay: 0.15s; }
    .pg-header-nav.active .pg-nav-item:nth-child(4) { transition-delay: 0.2s; }
}

/* ============================================
   REDUCED MOTION SUPPORT
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .agentic-container::before,
    .premium-calculator-panel::before,
    .premium-btn-calculate::before,
    .premium-result::before,
    .pg-header-icon::after,
    .pg-header.scrolled::after {
        animation: none;
    }

    .premium-calculator-panel,
    .premium-btn,
    .premium-tab,
    .premium-card,
    .pg-header-nav,
    .pg-nav-item {
        transition-duration: 0.2s;
    }
}
