/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-size: 16px;
}

/* Container and layout */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header styles */
.header {
    text-align: center;
    margin-bottom: 3rem;
}

.header h1 {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

/* Main content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Card styles */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.info-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.card h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.card h3 {
    font-size: 1.4rem;
    color: #555;
    margin-bottom: 1rem;
}

.card p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Button styles */
.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.2rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    font-family: inherit;
}

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

.primary-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    color: #667eea;
    background: white;
    border: 2px solid #667eea;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: inherit;
}

.secondary-button:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

.button-icon {
    font-size: 1.4rem;
}

/* Action section */
.action-section {
    text-align: center;
    margin: 2rem 0;
}

/* Steps list */
.steps-list {
    list-style: none;
    counter-reset: step-counter;
}

.steps-list li {
    counter-increment: step-counter;
    margin-bottom: 1rem;
    padding-left: 3rem;
    position: relative;
    font-size: 1.1rem;
    color: #555;
}

.steps-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Form styles */
.config-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.form-group input {
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border: 2px solid #e1e5e9;
    border-radius: 15px;
    background: white;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    color: #888;
    font-size: 0.9rem;
}

/* Form actions */
.form-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* Hash info */
.hash-info {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.hash-info code {
    background: #e9ecef;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    color: #495057;
}

.hash-info small {
    display: block;
    margin-top: 0.5rem;
    color: #6c757d;
}

/* History page specific styles */
.daily-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 15px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.stat-value.time-low {
    color: #fd7e14;
}

.stat-value.time-up {
    color: #dc3545;
}

/* Progress bar */
.progress-container {
    margin-top: 2rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
}

.progress-bar {
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 10px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Sessions list */
.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.session-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #28a745;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.session-item.stop {
    border-left-color: #fd7e14;
}

.session-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.session-time {
    font-weight: bold;
    color: #495057;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
}

.session-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    margin: 0 1rem;
}

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

.action-text {
    font-weight: 500;
    color: #333;
}

.session-duration {
    font-weight: bold;
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
}

/* No sessions state */
.no-sessions {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.no-sessions-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-sessions p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* Tips list */
.tips-list {
    list-style: none;
    display: grid;
    gap: 0.8rem;
}

.tips-list li {
    padding: 0.8rem 1rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    border-left: 3px solid #667eea;
    font-weight: 500;
}

.tips-list li::before {
    content: "💡";
    margin-right: 0.5rem;
}

/* Footer actions */
.footer-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-link {
    text-align: center;
}

/* Responsive design for history */
@media (max-width: 768px) {
    .daily-stats {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .stat-item {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

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

    .session-item {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }

    .session-action {
        margin: 0;
        justify-content: center;
    }

    .footer-actions {
        flex-direction: column;
        align-items: center;
    }

    .primary-button,
    .secondary-button {
        width: 100%;
        max-width: 300px;
    }
}

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

    .sessions-list {
        max-height: 300px;
    }

    .session-item {
        padding: 0.8rem 1rem;
    }

    .session-time {
        font-size: 0.8rem;
    }
}

/* Footer */
.footer {
    margin-top: 3rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

.back-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: white;
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem 0.5rem;
    }

    .header h1 {
        font-size: 2.5rem;
    }

    .card {
        padding: 1.5rem;
        border-radius: 15px;
    }

    .primary-button {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .secondary-button {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .card {
        padding: 1rem;
    }

    .primary-button {
        width: 100%;
        padding: 1rem;
    }
}