:root {
    --primary: #FF5722;
    --primary-dark: #E64A19;
    --bg-color: #F8F9FA;
    --card-bg: #FFFFFF;
    --text-main: #212529;
    --text-muted: #6C757D;
    --border-radius: 16px;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    padding-bottom: 40px;
}

.header {
    background: linear-gradient(135deg, #1E3C72 0%, #2A5298 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    margin-bottom: -20px;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 10;
}

.header h1 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.header-logo {
    width: 130px;
}

.header p {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 15px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-top: 60px;
    box-shadow: var(--shadow);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.card h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #343A40;
}

.day-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.day-btn {
    background: #F1F3F5;
    border: 2px solid transparent;
    padding: 16px 12px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}

.day-btn small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
}

.day-btn.selected {
    background: rgba(255, 87, 34, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.day-btn.selected small {
    color: var(--primary);
}

.disabled-step {
    opacity: 0.5;
    pointer-events: none;
}

/* Base button styling */
.upload-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    /* Added gap between text and loader */
    width: 100%;
    padding: 18px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}

.upload-btn:active {
    background: var(--primary-dark);
    transform: scale(0.98);
}

.upload-btn input[type="file"] {
    display: none;
}

.upload-btn.final-upload {
    background: #20C997;
    margin-top: 16px;
}

.upload-btn.final-upload:active {
    background: #12B886;
}

.preview-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #E9ECEF;
    border: 1px solid #DEE2E6;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-item canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.preview-item .remove-photo {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.loader-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.loading-text {
    font-size: 14px;
    font-weight: 600;
}

.hidden {
    display: none !important;
}

.success-card {
    text-align: center;
    padding: 40px 24px;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: #4CAF50;
    color: white;
    font-size: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
}

.success-card p {
    color: var(--text-muted);
    margin: 10px 0 24px 0;
    line-height: 1.5;
}

.error-toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #FA5252;
    color: white;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(250, 82, 82, 0.3);
    z-index: 100;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.loader {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    display: inline-block;
}

.loader.hidden {
    display: none !important;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

button:disabled,
.upload-btn[disabled] {
    opacity: 0.7;
    pointer-events: none;
}