:root {
    --bg-color: #0f172a; /* Slate 900 */
    --card-bg: rgba(30, 41, 59, 0.7); /* Slate 800 with opacity */
    --text-main: #f8fafc; /* Slate 50 */
    --text-muted: #94a3b8; /* Slate 400 */
    --accent-color: #fbbf24; /* Amber 400 - premium gold touch */
    --accent-hover: #f59e0b; /* Amber 500 */
    --danger-color: #ef4444; /* Red 500 */
    --border-color: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(15, 23, 42, 0.6);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 15px rgba(251, 191, 36, 0.2);
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font-family: 'Outfit', 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);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 20px 10px;
    background-image: 
        radial-gradient(at 0% 0%, rgba(251, 191, 36, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(30, 58, 138, 0.2) 0px, transparent 50%);
    background-attachment: fixed;
    line-height: 1.5;
}

.app-container {
    width: 100%;
    max-width: 480px; /* Mobile screen max width */
    margin: 0 auto;
    position: relative;
    padding-bottom: 80px; /* Space for sticky button */
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.app-header {
    text-align: center;
    margin-bottom: 24px;
    padding: 20px 0;
}

.app-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(251, 191, 36, 0.3);
}

.app-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 4px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-glow);
}

.card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-main);
    display: flex;
    align-items: center;
}

.card h2::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-color) 0%, transparent 100%);
    margin-left: 12px;
    opacity: 0.3;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h2 {
    margin-bottom: 0;
}

.section-header::after {
    display: none;
}

/* Inputs */
.input-group {
    margin-bottom: 16px;
    position: relative;
}

.input-row {
    display: flex;
    gap: 12px;
}

.input-row .input-group {
    flex: 1;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="number"],
input[type="date"] {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

input::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

/* Checkbox */
.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 20px;
    width: 20px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--accent-hover);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.checkmark:after {
    content: "";
    display: none;
    width: 5px;
    height: 10px;
    border: solid #0f172a;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

/* Items */
.item-row {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.item-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-color);
}

.btn-remove {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-remove:hover {
    background: var(--danger-color);
    color: white;
}

.item-total-display {
    text-align: right;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-color);
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
    margin-top: 8px;
}

.btn-add {
    width: 100%;
    padding: 14px;
    background: transparent;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-add:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(251, 191, 36, 0.05);
}

/* Summary */
.live-summary {
    background: var(--input-bg);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.summary-row.highlight {
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
    padding-top: 12px;
    color: var(--text-main);
    font-weight: 600;
    font-size: 1.15rem;
}

/* Action Footer */
.action-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 16px 20px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    z-index: 100;
    display: flex;
    justify-content: center;
}

.btn-generate {
    width: 100%;
    max-width: 480px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: #0f172a;
    border: none;
    border-radius: var(--radius-xl);
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.6);
}

.btn-generate:active {
    transform: translateY(1px);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--card-bg);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
