:root {
    --bg-color: #0f0f0f;
    --card-bg: #0f0f0f;
    /* YouTube uses flat black background mostly, or very dark gray */
    --text-main: #ffffff;
    --text-muted: #aaaaaa;
    --border: #3f3f3f;
    --primary-btn: #3ea6ff;
    /* YouTube Blue Button */
    --primary-btn-hover: #65b8ff;
    --font-family: 'Roboto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Center vertically */
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

header {
    text-align: center;
    /* Center logo */
    margin-bottom: 20px;
}

.yt-logo {
    width: 180px;
    height: auto;
    object-fit: contain;
}

/* Card Styles */
.card {
    background: var(--card-bg);
    /* border: 1px solid var(--border); */
    /* YouTube often flat on mobile, but let's keep it clean */
    border-radius: 4px;
    padding: 24px 0;
    /* Less padding on sides for full width feel, but we are centered */
    width: 100%;
}

.card-header {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
}

h2 {
    font-size: 1.2rem;
    font-weight: 500;
    /* Roboto Medium */
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Bill Details */
.bill-details {
    margin-bottom: 24px;
}

.row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.row.total {
    color: var(--text-main);
    font-weight: 500;
    font-size: 1.1rem;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    margin-top: 12px;
}

/* Input Fields */
.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

input {
    width: 100%;
    padding: 10px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--text-muted);
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s;
    border-radius: 0;
}

input:focus {
    outline: none;
    border-bottom-color: var(--primary-btn);
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 12px 24px;
    background-color: var(--primary-btn);
    border: none;
    border-radius: 2px;
    /* YouTube buttons are slightly rounded */
    color: #0f0f0f;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 20px;
}

.btn-primary:hover {
    background-color: var(--primary-btn-hover);
}

.hidden {
    display: none !important;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    border-top-color: #000;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.terms {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 24px;
    line-height: 1.4;
}

.terms a {
    color: var(--primary-btn);
    text-decoration: none;
}

/* Success Section */
#success-section {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    color: #2ba640;
    /* Green */
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
}

/* Progress Bar Styles */
.progress-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 8px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #333;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--primary-btn);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.progress-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.per-person {
    color: var(--primary-btn);
}