* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Courier New', monospace;
    background: #0a0a0a;
    color: #d4d4d4;
    min-height: 100vh;
    padding: 8px;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(10, 30, 10, 0.2) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(30, 10, 10, 0.2) 0%, transparent 20%);
    touch-action: manipulation;
    overflow-x: hidden;
    position: relative;
}

/* FIXED: Snow background */
.snow-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.snowflake {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    pointer-events: none;
}

/* FIXED: All close buttons - SQUARE with X */
.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(198, 40, 40, 0.2);
    border: 2px solid #c62828;
    color: #c62828;
    font-size: 1.5rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: bold;
}

.close-modal:hover {
    background: #c62828;
    color: white;
    transform: rotate(90deg);
}

.close-menu-btn {
    background: rgba(198, 40, 40, 0.2);
    border: 2px solid #c62828;
    color: #c62828;
    font-size: 1.8rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: bold;
}

.close-menu-btn:hover {
    background: #c62828;
    color: white;
    transform: rotate(90deg);
}

/* Admin Modal */
.admin-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 20000;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.admin-modal.active {
    display: flex;
    animation: fadeIn 0.3s;
}

.admin-modal-content {
    background: rgba(15, 15, 15, 0.98);
    border: 2px solid #c62828;
    border-radius: 10px;
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 25px;
    box-shadow: 0 0 30px rgba(198, 40, 40, 0.6);
    position: relative;
}

.admin-modal-header {
    color: #c62828;
    font-size: 1.6rem;
    margin-bottom: 25px;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #444;
}

.admin-section {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid #333;
}

.admin-section-title {
    color: #c62828;
    font-size: 1.2rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.stat-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    color: #c62828;
    font-weight: bold;
    margin: 5px 0;
}

.stat-label {
    color: #aaa;
    font-size: 0.85rem;
}

.user-search {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.user-search input {
    flex: 1;
    padding: 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    border-radius: 6px;
    color: #e0e0e0;
    font-family: 'Courier New', monospace;
}

.user-search button {
    padding: 12px 20px;
    background: #c62828;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.no-results {
    text-align: center;
    color: #777;
    padding: 30px 20px;
    font-style: italic;
}

.user-result {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

.user-name {
    font-size: 1.2rem;
    color: #e0e0e0;
    font-weight: bold;
}

.user-email {
    color: #aaa;
    font-size: 0.9rem;
}

.premium-badges {
    display: flex;
    gap: 8px;
    margin: 10px 0;
}

.premium-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

.premium-badge.none {
    background: #333;
    color: #aaa;
}

.premium-badge.basic {
    background: #0066cc;
    color: white;
}

.premium-badge.premium {
    background: linear-gradient(45deg, #ff9900, #ff6600);
    color: white;
}

.premium-badge.vip {
    background: linear-gradient(45deg, #9900ff, #6600cc);
    color: white;
}

.grant-premium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 15px;
}

.grant-btn {
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.grant-btn.basic {
    background: #0066cc;
    color: white;
}

.grant-btn.premium {
    background: linear-gradient(45deg, #ff9900, #ff6600);
    color: white;
}

.grant-btn.vip {
    background: linear-gradient(45deg, #9900ff, #6600cc);
    color: white;
}

.grant-btn.revoke {
    grid-column: span 3;
    background: #c62828;
    color: white;
    margin-top: 8px;
}

.premium-request-item {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.request-info {
    flex: 1;
}

.request-actions {
    display: flex;
    gap: 8px;
}

.request-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    transition: all 0.3s;
}

.request-btn.approve {
    background: #00a86b;
    color: white;
}

.request-btn.reject {
    background: #c62828;
    color: white;
}

/* Database buttons */
.db-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.db-btn {
    padding: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    background: #333;
    color: #e0e0e0;
    transition: all 0.3s;
}

.db-btn:hover {
    background: #444;
    transform: translateY(-2px);
}

.db-btn.danger {
    background: #c62828;
    color: white;
}

.db-btn.danger:hover {
    background: #d32f2f;
}

/* Custom modals */
.custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.custom-modal.active {
    display: flex;
    animation: fadeIn 0.3s;
}

.custom-modal-content {
    background: rgba(15, 15, 15, 0.98);
    border: 2px solid #c62828;
    border-radius: 10px;
    width: 90%;
    max-width: 450px;
    padding: 25px;
    box-shadow: 0 0 30px rgba(198, 40, 40, 0.6);
    position: relative;
}

.custom-modal-header {
    color: #c62828;
    font-size: 1.4rem;
    margin-bottom: 20px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

.custom-modal-body {
    color: #e0e0e0;
    margin-bottom: 25px;
    line-height: 1.5;
    text-align: center;
}

.custom-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 120px;
}

.modal-btn.confirm {
    background: #c62828;
    color: white;
}

.modal-btn.cancel {
    background: #333;
    color: #aaa;
    border: 1px solid #444;
}

/* Improve Premium Modal */
.improve-features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}

.improve-features li {
    padding: 8px 0;
    color: #aaa;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.improve-features li i {
    color: #ff9900;
}

.improve-price {
    margin: 20px 0;
    text-align: center;
}

.old-price {
    color: #777;
    text-decoration: line-through;
    font-size: 1.2rem;
    margin-right: 10px;
}

.new-price {
    color: #ff9900;
    font-size: 1.8rem;
    font-weight: bold;
    margin-right: 10px;
}

.discount {
    background: #c62828;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
}

/* COMPACT time selector */
.custom-time-selector {
    position: absolute;
    background: rgba(10, 10, 10, 0.98);
    border: 2px solid #c62828;
    border-radius: 8px;
    padding: 12px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    display: none;
    width: 220px;
}

.custom-time-selector.active {
    display: block;
    animation: slideDown 0.3s;
}

.time-header {
    color: #c62828;
    text-align: center;
    margin-bottom: 12px;
    font-weight: bold;
    font-size: 1rem;
}

.time-presets {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.time-preset {
    padding: 12px 5px;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    font-weight: bold;
}

.time-preset:hover {
    background: rgba(198, 40, 40, 0.3);
    border-color: #c62828;
}

.time-preset.selected {
    background: #c62828;
    color: white;
    border-color: #c62828;
}

/* COMPACT calendar */
.custom-calendar {
    position: absolute;
    background: rgba(10, 10, 10, 0.98);
    border: 2px solid #c62828;
    border-radius: 8px;
    padding: 12px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    display: none;
    width: 260px;
}

.custom-calendar.active {
    display: block;
    animation: slideDown 0.3s;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    color: #c62828;
}

.calendar-nav {
    background: none;
    border: none;
    color: #c62828;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav:hover {
    background: rgba(198, 40, 40, 0.2);
}

.calendar-title {
    font-weight: bold;
    font-size: 1rem;
    text-align: center;
    flex: 1;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin-bottom: 8px;
}

.weekday {
    text-align: center;
    color: #777;
    font-size: 0.8rem;
    padding: 4px 0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.calendar-day {
    padding: 6px 3px;
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    border: 1px solid transparent;
    font-size: 0.85rem;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day:hover {
    background: rgba(198, 40, 40, 0.2);
    border-color: #c62828;
}

.calendar-day.selected {
    background: #c62828;
    color: white;
}

.calendar-day.disabled {
    color: #555;
    cursor: not-allowed;
}

.calendar-day.disabled:hover {
    background: transparent;
    border-color: transparent;
}

.calendar-day.other-month {
    color: #666;
}

.calendar-footer {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #444;
    text-align: center;
}

.today-btn {
    background: none;
    border: 1px solid #c62828;
    color: #c62828;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    transition: all 0.3s;
    font-size: 0.85rem;
}

.today-btn:hover {
    background: rgba(198, 40, 40, 0.2);
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: 1px solid #c62828;
    color: #c62828;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s;
    font-size: 1.2rem;
}

.mobile-menu-btn:hover {
    background: rgba(198, 40, 40, 0.2);
}

/* Top Header - SIMPLIFIED (no premium display) */
.top-header {
    background: rgba(10, 10, 10, 0.95);
    border-bottom: 2px solid #333;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1000;
    flex-wrap: wrap;
    gap: 10px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo {
    height: 40px;
    width: auto;
}

.auth-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 1;
    min-width: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #aaa;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
    min-width: 0;
}

/* REMOVED: .premium-indicator and .entries-left from desktop header */

.auth-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.auth-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.login-btn {
    background: rgba(0, 0, 0, 0.5);
    color: #aaa;
    border: 1px solid #444;
}

.register-btn {
    background: #c62828;
    color: white;
}

.admin-btn {
    background: #00a86b;
    color: white;
}

.logout-btn {
    background: rgba(0, 0, 0, 0.5);
    color: #aaa;
    border: 1px solid #444;
}

.buy-premium-btn {
    background: linear-gradient(45deg, #ff9900, #ff6600);
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 153, 0, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 153, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 153, 0, 0); }
}

/* Language selector - FIXED */
.language-selector {
    position: relative;
    flex-shrink: 0;
}

.language-btn {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #c62828;
    color: white;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 50px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.language-btn:hover {
    background: #c62828;
}

.language-btn .flag-icon {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
}

.language-btn .arrow {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.language-btn.active .arrow {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #000000;
    border: 1px solid #c62828;
    border-radius: 6px;
    margin-top: 5px;
    min-width: 180px;
    box-shadow: 0 5px 20px rgba(198, 40, 40, 0.4);
    display: none;
    z-index: 1002;
    padding: 5px 0;
}

.language-dropdown.show {
    display: block;
    animation: fadeIn 0.3s;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #333;
    background: #000;
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: rgba(198, 40, 40, 0.3);
}

.language-option .flag-icon {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid #444;
}

.language-option .name {
    flex: 1;
    font-size: 0.9rem;
    color: #e0e0e0;
}

.language-option .code {
    color: #c62828;
    font-size: 0.8rem;
    font-weight: bold;
    background: rgba(198, 40, 40, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Mobile menu - FIXED language selector */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background: rgba(10, 10, 10, 0.98);
    border-left: 2px solid #c62828;
    z-index: 10001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 20px;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.7);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

.mobile-menu-title {
    color: #c62828;
    font-size: 1.4rem;
    font-weight: bold;
}

.mobile-menu-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-menu-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-menu-section-title {
    color: #c62828;
    font-size: 1.1rem;
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 1px solid #444;
}

.mobile-menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-auth-btn {
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    font-size: 0.95rem;
}

.mobile-auth-btn.improve-premium-btn {
    background: linear-gradient(45deg, #ffd700, #ff9900);
    color: black;
    font-weight: bold;
}

/* FIXED: Mobile language selector - COMPACT */
.mobile-language-selector {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    border-radius: 6px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s;
}

.mobile-language-selector:hover {
    border-color: #c62828;
}

.mobile-language-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.mobile-language-name {
    color: #e0e0e0;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* FIXED: Mobile language dropdown - COMPACT */
.mobile-language-dropdown {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #c62828;
    border-radius: 6px;
    margin-top: 8px;
    max-height: 250px;
    overflow-y: auto;
    display: none;
}

.mobile-language-dropdown.show {
    display: block;
}

.mobile-language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #333;
}

.mobile-language-option:last-child {
    border-bottom: none;
}

.mobile-language-option:hover {
    background: rgba(198, 40, 40, 0.3);
}

/* Mobile user status - premium display ONLY in mobile */
.mobile-user-status {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

.premium-indicator {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    white-space: nowrap;
}

.premium-indicator.none {
    background: #333;
    color: #aaa;
}

.premium-indicator.basic {
    background: #0066cc;
    color: white;
}

.premium-indicator.premium {
    background: linear-gradient(45deg, #ff9900, #ff6600);
    color: white;
}

.premium-indicator.vip {
    background: linear-gradient(45deg, #9900ff, #6600cc);
    color: white;
}

.entries-left {
    color: #c62828;
    font-weight: bold;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Auth Modal */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 15000;
    align-items: center;
    justify-content: center;
}

.auth-modal.active {
    display: flex;
}

.auth-modal-content {
    background: rgba(20, 20, 20, 0.98);
    border: 2px solid #c62828;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    padding: 25px;
    box-shadow: 0 0 30px rgba(198, 40, 40, 0.5);
    position: relative;
}

.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #444;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    color: #aaa;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-tab.active {
    color: #c62828;
    border-bottom: 2px solid #c62828;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.5s;
}

.auth-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    border-radius: 6px;
    color: #e0e0e0;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
}

.auth-form button {
    width: 100%;
    padding: 14px;
    background: #c62828;
    color: white;
    border: none;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.auth-error {
    color: #ff5555;
    text-align: center;
    margin-top: 10px;
    font-size: 0.85rem;
    min-height: 20px;
}

/* Premium Plans Modal */
.premium-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 15000;
    align-items: center;
    justify-content: center;
}

.premium-modal.active {
    display: flex;
}

.premium-modal-content {
    background: rgba(20, 20, 20, 0.98);
    border: 2px solid #c62828;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 25px;
    box-shadow: 0 0 30px rgba(198, 40, 40, 0.5);
    position: relative;
}

.premium-plans-container {
    display: flex;
    gap: 15px;
    margin: 25px 0;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
}

.premium-plan {
    flex: 1;
    min-width: 220px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: auto;
}

.premium-plan:hover {
    transform: translateY(-5px);
    border-color: #c62828;
}

.premium-plan.recommended {
    border: 2px solid #ff9900;
    position: relative;
}

.recommended-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff9900;
    color: black;
    padding: 4px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    white-space: nowrap;
    z-index: 1;
}

.plan-name {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #ff9900;
}

.plan-price {
    font-size: 2rem;
    color: #ff9900;
    font-weight: bold;
    margin: 15px 0;
}

.plan-duration {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    flex-grow: 1;
}

.plan-features li {
    padding: 8px 0;
    color: #aaa;
    font-size: 0.9rem;
    border-bottom: 1px solid #333;
    text-align: left;
    padding-left: 25px;
    position: relative;
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-features li i {
    color: #ff9900;
    position: absolute;
    left: 0;
    top: 9px;
}

.select-plan-btn {
    width: 100%;
    padding: 12px;
    background: #ff9900;
    color: black;
    border: none;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: auto;
}

/* Main container - MADE SMALLER */
.container {
    max-width: 100%;
    margin: 0 auto;
    background: rgba(15, 15, 15, 0.95);
    border: 1px solid #333;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 100, 0, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 100;
    margin-top: 10px;
}

.container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 1;
}

/* Header */
header {
    text-align: center;
    padding: 15px 10px;
    border-bottom: 2px solid #3a3a3a;
    background: linear-gradient(to right, #111, #222, #111);
    position: relative;
    z-index: 100;
}

h1 {
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    color: #e60000;
    text-shadow: 0 0 10px rgba(230, 0, 0, 0.5);
    letter-spacing: 2px;
    margin-bottom: 5px;
    font-weight: normal;
    word-break: break-word;
}

h1::before, h1::after {
    content: "✞";
    margin: 0 8px;
    color: #aaa;
    font-size: clamp(1.2rem, 4vw, 1.8rem);
}

.subtitle {
    color: #8a8a8a;
    font-size: clamp(0.85rem, 3vw, 1rem);
    letter-spacing: 0.5px;
    line-height: 1.4;
    padding: 0 5px;
}

/* Main content */
main {
    display: flex;
    flex-direction: column;
    min-height: 500px;
    position: relative;
    z-index: 10;
}

/* Left panel - form */
.left-panel {
    width: 100%;
    padding: 15px;
    border-bottom: 1px solid #333;
    position: relative;
}

.form-title {
    color: #c62828;
    font-size: clamp(1.2rem, 4vw, 1.4rem);
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 1px solid #444;
    padding-bottom: 8px;
}

.form-group {
    margin-bottom: 15px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #aaa;
    font-size: clamp(0.9rem, 3vw, 1rem);
    padding-left: 5px;
}

input, textarea, select {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    border-radius: 4px;
    color: #e0e0e0;
    font-family: 'Courier New', monospace;
    font-size: clamp(0.95rem, 3vw, 1.05rem);
    transition: all 0.3s;
    -webkit-appearance: none;
    appearance: none;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #c62828;
    box-shadow: 0 0 8px rgba(198, 40, 40, 0.3);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.date-time-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.date-input, .time-select {
    width: 100%;
    position: relative;
}

#deathDate {
    text-align: center;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    border-radius: 4px;
    padding: 12px;
    color: #e0e0e0;
    font-family: 'Courier New', monospace;
    font-size: clamp(0.95rem, 3vw, 1.05rem);
    width: 100%;
    transition: all 0.3s;
    position: relative;
}

#deathDate::after {
    content: "📅";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #c62828;
    pointer-events: none;
}

.custom-time-btn {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    border-radius: 4px;
    color: #e0e0e0;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
    font-size: clamp(0.95rem, 3vw, 1.05rem);
    position: relative;
}

.death-cause {
    color: #c62828;
    font-size: clamp(0.75rem, 2.5vw, 0.8rem);
    margin-top: 5px;
    padding-left: 5px;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: clamp(0.95rem, 3vw, 1.05rem);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 1px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-btn {
    background: #c62828;
    color: white;
}

.add-btn.disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

.clear-btn {
    background: #333;
    color: #aaa;
    border: 1px solid #444;
}

.support-btn {
    background: #c62828;
    color: white;
    margin-top: 10px;
}

/* Right panel - list */
.right-panel {
    width: 100%;
    padding: 15px;
    background: rgba(10, 10, 10, 0.7);
}

.list-title {
    color: #c62828;
    font-size: clamp(1.2rem, 4vw, 1.4rem);
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 1px solid #444;
    padding-bottom: 8px;
}

.entry-count {
    text-align: center;
    color: #8a8a8a;
    margin-bottom: 15px;
    font-size: clamp(0.9rem, 3vw, 1rem);
}

.entry-count span {
    color: #c62828;
    font-weight: bold;
}

#deathList {
    max-height: 350px;
    overflow-y: auto;
    padding-right: 5px;
}

#deathList::-webkit-scrollbar {
    width: 6px;
}

#deathList::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

#deathList::-webkit-scrollbar-thumb {
    background: #c62828;
    border-radius: 3px;
}

/* Entries - WITH CREATOR INFO */
.entry {
    background: rgba(20, 20, 20, 0.8);
    border-left: 4px solid #c62828;
    margin-bottom: 10px;
    padding: 12px;
    position: relative;
    animation: fadeIn 0.5s;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.entry.premium {
    border-left: 4px solid #ff9900;
    background: rgba(30, 20, 10, 0.8);
}

.entry.vip {
    border-left: 4px solid #9900ff;
    background: rgba(30, 10, 30, 0.8);
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.entry-name {
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    color: #e0e0e0;
    font-weight: bold;
    flex: 1;
    word-break: break-word;
    padding-right: 10px;
}

.entry-delete {
    background: #333;
    color: #aaa;
    border: none;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 8px; /* FIXED: Square delete button */
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
    font-weight: bold;
}

.entry-delete:hover {
    background: #c62828;
    color: white;
    transform: rotate(90deg);
}

.entry-cause {
    color: #c62828;
    font-style: italic;
    margin-bottom: 5px;
    padding-left: 8px;
    border-left: 2px solid #444;
    font-size: clamp(0.85rem, 3vw, 0.95rem);
    line-height: 1.4;
    word-break: break-word;
}

.entry-date {
    color: #d92424;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: clamp(0.85rem, 3vw, 0.9rem);
    text-align: center;
}

/* Entry creator info */
.entry-creator {
    color: #666;
    font-size: clamp(0.75rem, 2.5vw, 0.8rem);
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.entry-creator-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #c62828;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: white;
    font-weight: bold;
}

.entry-timestamp {
    color: #666;
    font-size: clamp(0.75rem, 2.5vw, 0.8rem);
    text-align: right;
    margin-top: 8px;
    font-style: italic;
}

.empty-state {
    text-align: center;
    padding: 30px 15px;
    color: #666;
    font-size: clamp(0.95rem, 3vw, 1.05rem);
}

.empty-state i {
    font-size: clamp(2rem, 8vw, 2.5rem);
    display: block;
    margin-bottom: 10px;
    color: #444;
}

/* Footer */
footer {
    text-align: center;
    padding: 15px 10px;
    border-top: 2px solid #3a3a3a;
    color: #666;
    font-size: clamp(0.7rem, 2.5vw, 0.8rem);
    position: relative;
    z-index: 10;
}

footer p {
    margin: 5px 0;
    line-height: 1.4;
}

.rules {
    margin-top: 8px;
    font-size: clamp(0.65rem, 2vw, 0.7rem);
    color: #555;
    line-height: 1.4;
    opacity: 0.8;
}

/* Limit warning */
.limit-warning {
    background: rgba(198, 40, 40, 0.2);
    border: 1px solid #c62828;
    border-radius: 8px;
    padding: 12px;
    margin-top: 15px;
    text-align: center;
    color: #c62828;
    font-weight: bold;
    font-size: clamp(0.85rem, 3vw, 0.95rem);
}

.upgrade-link {
    color: #ff9900;
    text-decoration: underline;
    cursor: pointer;
    font-weight: bold;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .top-header {
        padding: 10px;
        gap: 8px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .logo-section {
        order: 1;
    }
    
    .logo {
        height: 35px;
    }
    
    .mobile-menu-btn {
        display: flex;
        order: 3;
    }
    
    .language-selector {
        order: 2;
        display: none;
    }
    
    .auth-section {
        display: none;
    }
    
    .mobile-user-status {
        display: flex;
    }
    
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grant-premium {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grant-btn.revoke {
        grid-column: span 2;
    }
    
    .premium-plans-container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .premium-plan {
        min-width: 100%;
    }
    
    .premium-plan.recommended {
        order: -1;
    }
    
    .premium-modal-content {
        padding: 20px 15px;
        margin: 5px;
    }
    
    .date-time-group {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .admin-modal-content {
        padding: 20px 15px;
    }
    
    .admin-section {
        padding: 15px;
    }
    
    .user-search {
        flex-direction: column;
    }
    
    .user-search button {
        width: 100%;
    }
    
    /* FIXED: Mobile language dropdown size */
    .mobile-language-dropdown {
        max-height: 200px;
    }
    
    .mobile-language-option {
        padding: 8px 10px;
    }
    
    .mobile-language-option .flag-icon {
        width: 22px;
        height: 14px;
    }
    
    .mobile-language-option .name {
        font-size: 0.85rem;
    }
    
    .mobile-language-option .code {
        font-size: 0.75rem;
        padding: 1px 4px;
    }
}

@media (max-width: 480px) {
    .top-header {
        padding: 8px;
    }
    
    .logo {
        height: 30px;
    }
    
    .mobile-menu-btn {
        width: 36px;
        height: 36px;
    }
    
    .premium-plan {
        padding: 15px;
    }
    
    .plan-price {
        font-size: 1.7rem;
    }
    
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .mobile-menu {
        max-width: 280px;
        padding: 15px;
    }
    
    .mobile-language-selector {
        padding: 10px;
    }
}

@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none;
    }
    
    .mobile-user-status {
        display: none;
    }
    
    .top-header {
        padding: 15px 20px;
        flex-direction: row;
        align-items: center;
    }
    
    .auth-section {
        display: flex;
    }
    
    .language-selector {
        display: block;
    }
    
    .container {
        max-width: 900px;
        margin-top: 15px;
    }
}

@media (min-width: 768px) {
    body {
        padding: 15px;
    }
    
    main {
        flex-direction: row;
    }
    
    .left-panel {
        width: 45%;
        border-right: 1px solid #333;
        border-bottom: none;
        padding: 20px;
    }
    
    .right-panel {
        width: 55%;
        padding: 20px;
    }
    
    .button-group {
        flex-direction: row;
    }
    
    button {
        width: auto;
        min-height: 45px;
        flex: 1;
    }
    
    .support-btn {
        margin-top: 15px;
    }
    
    #deathList {
        max-height: 450px;
    }
    
    .date-time-group {
        grid-template-columns: 2fr 1fr;
    }
    
    .mobile-language-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.95);
        border: 1px solid #c62828;
        border-radius: 6px;
        margin-top: 5px;
        max-height: 250px;
        overflow-y: auto;
        z-index: 1002;
        display: none;
        box-shadow: 0 10px 30px rgba(198, 40, 40, 0.4);
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1000px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .left-panel {
        padding: 25px;
    }
    
    .right-panel {
        padding: 25px;
    }
    
    .top-header {
        padding: 15px 25px;
    }
    
    .admin-modal-content {
        max-width: 1000px;
    }
}

@supports (-webkit-touch-callout: none) {
    input, textarea, button, select {
        font-size: 16px !important;
    }
    
    button {
        padding: 12px;
    }
    
    input[type="date"] {
        min-height: 44px;
    }
    
    select {
        min-height: 44px;
    }
}