:root {
    --primary: #ff0000; /* YouTube Red */
    --secondary: #f9f9f9;
    --accent: #ff4e50;
    --bg: #ffffff;
    --card-bg: #ffffff;
    --text: #0f0f0f;
    --text-muted: #606060;
    --glass: rgba(0, 0, 0, 0.05);
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: radial-gradient(circle at 50% 50%, #fcfcfc 0%, #ffffff 100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Glassmorphism Card */
.card {
    background: var(--card-bg);
    border: 1px solid #eeeeee;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 15px 50px -10px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.4);
    transform: scale(1.05);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 12px;
    background: #fcfcfc;
    border: 1px solid #dddddd;
    border-radius: 10px;
    color: var(--text);
    outline: none;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary);
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.user-item {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass);
}

th {
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* Badge */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.badge-success { background: #eefdf5; color: #2ecc71; border: 1px solid #2ecc7133; }
.badge-warning { background: #fffcf0; color: #f1c40f; border: 1px solid #f1c40f33; }
.badge-danger { background: #fef1f0; color: #e74c3c; border: 1px solid #e74c3c33; }

/* Dashboard Header */
.navbar {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass);
    margin-bottom: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span { color: var(--primary); }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Base layout adjustments for header menus */
.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 15px;
    flex-wrap: wrap;
}
.top-menu {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.action-buttons-mobile {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

/* Mobile Responsive Cards (Android View) */
@media screen and (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 1rem;
        text-align: center;
    }
    
    .btn {
        width: auto; /* Change from 100% to auto to avoid being too large */
        min-width: 120px;
        margin-bottom: 5px;
    }
    
    .header-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .top-menu {
        flex-direction: row; /* Keep buttons side-by-side or wrapped normally */
        justify-content: center;
        width: 100%;
    }
    
    /* Table to Card View */
    table, thead, tbody, th, td, tr {
        display: block;
        width: 100%;
    }
    
    thead tr {
        display: none;
    }
    
    tr {
        margin-bottom: 1.5rem;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.08); /* Slightly stronger shadow */
        border: 1px solid #eee;
        padding: 5px; /* Less padding to maximize space */
    }
    
    td {
        border-bottom: 1px solid #f8f8f8;
        padding: 12px 15px !important;
        min-height: 48px; /* Standard touch height */
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
    }

    td:before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        font-size: 0.7rem;
        text-align: left;
        flex: 1; /* Take up available space */
        min-width: 100px;
        margin-right: 15px;
    }

    /* Ensure content inside TD doesn't wrap messily */
    td > div, td > span, td > code {
        flex: 2;
        display: block;
        word-break: break-all;
    }
    
    td:last-child {
        border-bottom: none;
        display: block; /* Stack actions fully */
        padding-top: 15px !important;
    }

    td:last-child:before {
        display: block;
        margin-bottom: 15px;
        width: 100%;
        text-align: center;
        border-bottom: 1px dashed #eee;
        padding-bottom: 10px;
    }
    
    .action-buttons-mobile {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
    }
    
    .action-buttons-mobile .btn {
        margin-bottom: 0;
        padding: 10px 5px; /* More compact buttons */
        font-size: 0.75rem;
    }
}

/* User Dashboard Enhancements */
.renewal-card {
    padding: 2rem; 
    border-radius: 20px; 
    background: rgba(255, 0, 0, 0.05); 
    border: 1px dashed var(--primary); 
    text-align: center; 
    margin-bottom: 2rem;
}

.renewal-form {
    display: flex; 
    gap: 10px; 
    justify-content: center; 
    align-items: center; 
    max-width: 450px; 
    margin: 0 auto;
}

.renewal-form .btn, .renewal-form .form-control {
    flex: 1;
    height: 50px;
}

.user-details-list {
    background: #fdfdfd;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #eee;
}

.user-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

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

.user-detail-item label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.user-detail-item .val {
    text-align: right;
    font-weight: 500;
}

@media screen and (max-width: 500px) {
    .renewal-form {
        flex-direction: column;
    }
    
    .renewal-form .btn, .renewal-form .form-control {
        width: auto;
        min-width: 200px;
    }
    
    .user-detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .user-detail-item .val {
        text-align: left;
        width: 100%;
    }
}
