:root {
    --bg-color: #050505;
    --card-bg: rgba(26, 26, 26, 0.6);
    --primary-color: #ff5500;
    --primary-hover: #ff732e;
    --primary-gradient: linear-gradient(135deg, #ff5500, #ff2a00);
    --text-main: #ffffff;
    --text-muted: #999999;
    --border-color: rgba(255, 255, 255, 0.1);
    --danger: #ff3b30;
    --success: #34c759;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at 50% 0%, rgba(255, 85, 0, 0.1) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 500px;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    margin: 2rem auto;
}

.container-large {
    max-width: 800px;
}

h1, h2, h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

h1, h2 {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="password"],
input[type="number"],
select {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 85, 0, 0.2);
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 1rem;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(255, 85, 0, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 85, 0, 0.4);
}

.btn:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.btn-danger {
    background: #ff3b30;
    box-shadow: 0 4px 15px rgba(255, 59, 48, 0.3);
}

.btn-danger:hover {
    background: #ff2d20;
    box-shadow: 0 6px 20px rgba(255, 59, 48, 0.4);
}

.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 500;
    backdrop-filter: blur(5px);
}

.alert-error {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
    color: #ff6b63;
}

.alert-success {
    background: rgba(52, 199, 89, 0.1);
    border: 1px solid rgba(52, 199, 89, 0.3);
    color: #63d47d;
}

.balance-card {
    text-align: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
}

.balance-amount {
    font-size: 3rem;
    font-weight: 900;
    color: var(--text-main);
    margin: 0.5rem 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.balance-amount.negative {
    color: var(--danger);
}

.drinks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.25rem;
}

.drink-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.drink-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 85, 0, 0.5);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.drink-name {
    font-weight: 800;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: var(--text-main);
}

.drink-price {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.header-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.header-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.4rem 0.8rem;
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
}

.header-links a:hover {
    color: var(--text-main);
    background: rgba(255,255,255,0.1);
}

.admin-section {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.admin-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--primary-color);
    text-align: left;
    background: none;
    -webkit-text-fill-color: var(--primary-color);
}

.qty-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
}

.btn-qty {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 50%;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    outline: none;
}

.btn-qty:hover {
    background: rgba(255, 85, 0, 0.2);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-qty:active {
    transform: scale(0.9);
}

.qty-input {
    width: 40px;
    text-align: center;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-weight: 800;
    font-size: 1.1rem;
    -moz-appearance: textfield;
    padding: 0;
}

.qty-input:focus {
    box-shadow: none;
    background: transparent;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 1rem 2rem;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.bottom-bar-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

#total-price-display {
    font-weight: 900;
    font-size: 1.4rem;
    color: var(--text-main);
}

#btn-buy {
    width: auto;
    flex: 1;
    max-width: 300px;
    margin: 0;
}

#btn-buy:disabled {
    background: rgba(255,255,255,0.1);
    box-shadow: none;
    cursor: not-allowed;
    color: rgba(255,255,255,0.3);
}

/* TABLE FOR ADMIN OVERVIEW */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.admin-table th {
    padding: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
}
.admin-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-weight: 500;
}
.admin-table tr:last-child td {
    border-bottom: none;
}
.table-responsive {
    overflow-x: auto;
}

/* MOBILE OPTIMIZATIONS */
@media (max-width: 600px) {
    body {
        align-items: flex-start;
    }
    
    .container {
        margin: 0;
        border-radius: 0;
        border: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1.5rem 1rem;
        min-height: 100vh;
        background: transparent;
        backdrop-filter: none;
        box-shadow: none;
    }
    
    .header {
        flex-direction: column;
        gap: 1rem;
        padding-bottom: 1rem;
    }
    
    .header h2 {
        margin-bottom: 0;
        font-size: 1.4rem;
    }
    
    .balance-card {
        padding: 1.5rem;
    }
    
    .balance-amount {
        font-size: 2.5rem;
    }
    
    .drinks-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .drink-card {
        padding: 1rem 0.5rem;
    }
    
    .drink-name {
        font-size: 1rem;
    }
    
    .bottom-bar {
        padding: 1rem;
    }
    
    #total-price-display {
        font-size: 1.2rem;
    }
    
    .btn-qty {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
    }
}

