:root {
    --primary: #007bff;
    --success: #28a745;
    --warning: #fd7e14;
    --passed: #6c757d;
    --bg: #f4f7f9;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background-color: var(--bg);
    -webkit-tap-highlight-color: transparent;
}

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.controls {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

input[type="date"] {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
}

.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

button {
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s;
}

#btn-forward { background: var(--primary); color: white; }
#btn-return { background: #343a40; color: white; }
button:active { transform: scale(0.97); }

.results-container {
    max-width: 500px;
    margin: 20px auto;
    padding: 0 15px 20px 15px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-left: 6px solid #dee2e6;
    transition: opacity 0.3s;
}

.card.status-passed { border-left-color: var(--passed); opacity: 0.6; }
.card.status-optimal { border-left-color: var(--success); }
.card.status-tight { border-left-color: var(--warning); }

.timeline { display: flex; flex-direction: column; gap: 8px; }
.step { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.time { font-weight: bold; font-size: 16px; min-width: 50px; }

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-top: 10px;
    font-weight: bold;
}
.badge-tight { background: #fff3cd; color: #856404; }
.badge-optimal { background: #d4edda; color: #155724; }

.fab-share {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 56px;
    height: 56px;
    border-radius: 28px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Skeleton Loading Animation */
.skeleton {
    height: 100px;
    background: linear-gradient(90deg, #ececec 25%, #f5f5f5 50%, #ececec 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 12px;
    margin-bottom: 15px;
}
@keyframes loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.welcome-msg {
    text-align: center;
    color: #6c757d;
    font-size: 16px;
    margin-top: 20px;
    line-height: 1.5;
}

.app-footer {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 15px 100px 15px;
    text-align: center;
}

.app-footer h4 {
    margin-top: 10px;
    margin-bottom: 15px;
    color: #495057;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-btn {
    display: inline-block;
    padding: 12px;
    background: #e9ecef;
    color: #495057;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    transition: background 0.2s, transform 0.1s;
}

.footer-btn:hover {
    background: #dee2e6;
}

.footer-btn:active {
    transform: scale(0.98);
}
