:root {
    --bg-outside: #f0f0f4;
    --bg-main: #ffffff;
    --text-dark: #09090b;
    --text-muted: #71717a;
    --card-dark: #121214;
    --card-dark-secondary: #27272a;
    --card-light: #f4f4f5;
    --accent: #e4e4e7;
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.2);
    
    --font-main: 'Plus Jakarta Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-outside);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Mobile App Container Look (like the screenshot) */
.mobile-wrapper {
    width: 100%;
    max-width: 420px;
    height: 100vh;
    max-height: 850px;
    background-color: var(--bg-main);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

@media (min-width: 421px) {
    .mobile-wrapper {
        height: 90vh;
        border-radius: 40px;
        border: 8px solid #ffffff;
        box-shadow: 0 30px 60px rgba(0,0,0,0.1);
    }
}

.app-container {
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Header */
.header {
    margin-bottom: 40px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-square {
    width: 16px;
    height: 16px;
    background-color: #ffd000; /* Subtle yellow accent like the screenshot */
    border-radius: 4px;
}

.brand h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* States */
.state-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    opacity: 0;
    display: none;
    transition: opacity 0.3s ease;
}

.state-group.active {
    display: flex;
    opacity: 1;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Typography styles */
.title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.5;
}

/* Loader */
#loader {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.loading-pulse {
    width: 40px;
    height: 40px;
    background-color: var(--text-dark);
    border-radius: 50%;
    margin-bottom: 24px;
    animation: pulse 1.5s infinite alternate ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1.2); opacity: 1; }
}

/* Dark Main Card (Success) */
.dark-card {
    background-color: var(--card-dark);
    border-radius: 28px;
    padding: 32px 24px;
    color: white;
    margin-bottom: 32px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--success-light);
}

.status-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: #a1a1aa;
}

.main-name {
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 12px;
}

.sub-course {
    font-size: 1rem;
    color: #d4d4d8;
    line-height: 1.5;
    margin-bottom: 32px;
}

.date-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #a1a1aa;
    font-weight: 500;
}

.duration {
    background-color: var(--card-dark-secondary);
    padding: 6px 12px;
    border-radius: 20px;
    color: white;
    font-weight: 600;
}

/* Light Details Section */
.light-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.list-card {
    background-color: var(--card-light);
    border-radius: 24px;
    padding: 12px 20px;
}

.list-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--accent);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.list-item.borderless {
    border-bottom: none;
}

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

.label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
    word-break: break-word;
}

/* Buttons & Footer */
.action-footer {
    margin-top: auto;
    text-align: center;
}

.primary-btn {
    width: 100%;
    background-color: var(--text-dark);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 99px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    margin-bottom: 16px;
    transition: transform 0.2s;
}

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

.secondary-btn {
    width: 100%;
    background-color: var(--card-light);
    color: var(--text-dark);
    border: none;
    padding: 18px;
    border-radius: 99px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    margin-top: 24px;
}

.footer-note {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Error State */
#error-state {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-circle {
    width: 64px;
    height: 64px;
    background-color: var(--card-dark);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 24px;
}
