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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

/* Typography */
h1 {
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    color: #333;
}

p {
    color: #555;
    margin-bottom: 15px;
}

/* Brand Header */
.brand-header {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
}

.brand-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.brand-link:hover {
    color: white;
    background: rgba(0, 0, 0, 0.3);
    transform: translateX(3px);
}

.brand-icon {
    font-size: 1.2em;
}

/* Layout Components */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 60px;
    padding-bottom: 20px;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    backdrop-filter: blur(10px);
}

/* Timer Specific Container */
.container-timer {
    padding: 25px 20px;
    max-width: 370px;
}

/* Page Content Container */
.container-page {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 30px;
    padding-bottom: 50px;
    padding-left: 50px;
    padding-right: 50px;
    line-height: 1.6;
}

/* Timer Components */
.timer-display {
    text-align: center;
    margin-bottom: 30px;
}

.phase-indicator {
    font-size: 1.3em;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.phase-indicator.focus {
    color: #667eea;
}

.phase-indicator.rest {
    color: #52c41a;
}

.time {
    font-size: 4.5em;
    font-weight: bold;
    color: #333;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    margin: 20px 0;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s linear, background-color 0.3s ease;
}

.progress-fill.focus {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.progress-fill.rest {
    background: linear-gradient(90deg, #52c41a 0%, #73d13d 100%);
}

/* Buttons */
button, .btn {
    padding: 12px 24px;
    font-size: 0.95em;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: inline-block;
}

.primary-btn, .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.primary-btn:hover, .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.secondary-btn, .btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.secondary-btn:hover, .btn-secondary:hover {
    background: #e0e0e0;
}

.back-link {
    display: inline-block;
    margin-top: 40px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.95em;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.back-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/* Controls */
.controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

/* Settings Panel */
.settings {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
}

.settings h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.1em;
    text-align: center;
    font-weight: 600;
}

/* Form Elements */
.time-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.input-group {
    background: white;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.input-group.focus-group {
    border-color: rgba(102, 126, 234, 0.2);
}

.input-group.rest-group {
    border-color: rgba(82, 196, 26, 0.2);
}

.input-label {
    display: block;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}

.input-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

input[type="number"] {
    width: 70px;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1.2em;
    text-align: center;
    font-weight: 600;
    transition: border-color 0.3s;
}

input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
}

.input-suffix {
    color: #666;
    font-size: 0.9em;
}

/* Options */
.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.option label {
    cursor: pointer;
    user-select: none;
    color: #666;
    font-size: 0.95em;
}

/* Statistics */
.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding-top: 16px;
    border-top: 2px solid #e0e0e0;
}

.stat {
    text-align: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
}

.stat.focus-stat {
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.stat.rest-stat {
    border: 2px solid rgba(82, 196, 26, 0.2);
}

.stat-value {
    font-size: 1.6em;
    font-weight: bold;
    margin-bottom: 4px;
}

.stat.focus-stat .stat-value {
    color: #667eea;
}

.stat.rest-stat .stat-value {
    color: #52c41a;
}

.stat-label {
    font-size: 0.75em;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Footer */
footer {
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85em;
}

.footer-left {
    display: flex;
    align-items: center;
}

.footer-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: rgba(255, 255, 255, 0.95);
}

/* Page Specific Styles */
.page-content h1 {
    margin-bottom: 10px;
    font-size: 2.5em;
}

.page-content h2 {
    margin-top: 35px;
    margin-bottom: 15px;
    font-size: 1.5em;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.page-content h2:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.page-content ul {
    margin-left: 30px;
    margin-bottom: 15px;
    color: #555;
}

.page-content li {
    margin-bottom: 8px;
}

.last-updated {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 40px;
}

/* Highlight Box */
.highlight-box {
    background: #f0f9ff;
    border-left: 4px solid #667eea;
    padding: 20px;
    margin: 25px 0;
    border-radius: 8px;
}

.highlight-box h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.highlight-box p {
    margin-bottom: 5px;
}

/* Contact Info */
.contact-info {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-top: 30px;
}

.contact-info p {
    margin-bottom: 5px;
}

/* 404 Error Page */
.error-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 50px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    text-align: center;
    backdrop-filter: blur(10px);
}

.error-code {
    font-size: 6em;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    line-height: 1;
}

.error-message {
    color: #666;
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 40px;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Timer Specific Title */
.timer-title {
    text-align: center;
    margin-bottom: 35px;
    font-size: 2.2em;
}

/* Media Queries */
@media (max-width: 1200px) {
    .brand-header {
        top: 15px;
        left: 15px;
    }

    .brand-link {
        font-size: 0.95em;
        padding: 6px 12px;
    }
}

@media (max-width: 600px) {
    .brand-header {
        top: 15px;
        left: 15px;
    }

    .brand-link {
        font-size: 0.95em;
        padding: 6px 12px;
    }

    footer {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .footer-left,
    .footer-right {
        width: 100%;
        justify-content: center;
    }

    .container-page {
        padding: 30px 20px;
    }

    .page-content h1 {
        font-size: 1.8em;
    }

    .page-content h2 {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .time {
        font-size: 2.8em;
    }
    
    .timer-title {
        font-size: 1.4em;
    }

    .time-inputs {
        grid-template-columns: 1fr;
    }

    .error-code {
        font-size: 4em;
    }
    
    .error-container {
        padding: 30px 20px;
    }
    
    .button-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
}