/**
 * Membership Card V2.0 Styles
 */

/* ===== IMPORTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;900&display=swap');

/* ===== VARIABLES ===== */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #8e44ad;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #e53935;
    --light-gray: #f0f0f0;
    --dark-gray: #444;
    --border-radius: 10px;
    --transition-speed: 0.3s;
    --font-family: 'Montserrat', sans-serif;
}

/* ===== MAIN CONTAINER ===== */
.lmv-membership-card-v2 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: var(--font-family);
}

/* ===== HEADER SECTION ===== */
.membership-card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 30px;
    border-radius: var(--border-radius);
    color: white;
    margin-bottom: 20px;
}

/* GamiPress Banners */
.gamipress-banner-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.gamipress-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

/* Date and Time */
.minimalist-date-time {
    font-size: 0.9em;
    font-weight: 400;
    text-align: center;
    color: white;
    margin: 15px 0;
}

#minimalist-live-clock-v2 {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.9em;
    letter-spacing: 0.05em;
    transition: all var(--transition-speed) ease-in-out;
}

#minimalist-live-clock-v2:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

/* Room Status Badges */
.room-status-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.success-badge {
    background: var(--success-color);
    color: white;
}

.overdue-badge {
    background: var(--danger-color);
    color: white;
}

.warning-badge {
    background: var(--warning-color);
    color: black;
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Room Title Animation */
.room-title {
    font-family: var(--font-family);
    font-size: 2em;
    font-weight: 900;
    text-transform: uppercase;
    text-align: center;
    margin: 20px auto;
    letter-spacing: 0.05em;
}

.zoom-in {
    animation: zoomIn 1.5s ease-in-out forwards;
}

.zoom-out {
    animation: zoomOut 1.5s ease-in-out forwards;
}

@keyframes zoomIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes zoomOut {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* Room Color Image */
.room-color-image {
    text-align: center;
    margin: 20px 0;
}

.room-color-image img {
    max-width: 30%;
    height: auto;
    border-radius: var(--border-radius);
}

/* GamiPress Achievements */
.gamipress-achievements {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.gamipress-achievements img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 5px;
    transition: transform var(--transition-speed);
}

.gamipress-achievements img:hover {
    transform: scale(1.1);
}

/* Door Codes */
.door-codes {
    text-align: center;
    margin: 20px 0;
}

.front-door-code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.countdown-expiry {
    color: var(--danger-color);
    font-weight: bold;
}

/* ===== STATUS BADGE ===== */
.status-badge-container {
    text-align: center;
    margin: 20px 0;
}

.status-badge {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 25px;
    font-family: var(--font-family);
    font-weight: 900;
    text-transform: uppercase;
    font-size: 1.1em;
    transition: opacity 0.5s ease-in-out;
    cursor: pointer;
}

.status-badge.hidden {
    opacity: 0;
}

/* ===== CONTENT SECTION ===== */
.membership-card-content {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.membership-card-info {
    margin-bottom: 30px;
}

.membership-card-info p {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--light-gray);
}

.label {
    font-weight: 700;
    color: var(--dark-gray);
}

.value {
    font-weight: 600;
    color: var(--primary-color);
}

/* Rent Cycle Indicator */
.rent-cycle-indicator {
    font-size: 1.2em;
    font-weight: bold;
    color: white;
    text-align: center;
    margin: 20px auto;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.countdown-timer {
    font-size: 0.9em;
    color: white;
    margin-top: 5px;
}

/* ===== BUTTONS ===== */
.button {
    display: block;
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.pay-now-button {
    background: var(--success-color);
    color: white;
}

.pay-now-button:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.blue-action-button {
    background: var(--primary-color);
    color: white;
}

.blue-action-button:hover {
    background: #357abd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.view-payments-button {
    background: var(--secondary-color);
    color: white;
}

.view-payments-button:hover {
    background: #7d3c98;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(142, 68, 173, 0.3);
}

/* Success Message */
.success-message {
    text-align: center;
    color: var(--success-color);
    font-family: var(--font-family);
    font-weight: 900;
    text-transform: uppercase;
    font-size: 1.2em;
    padding: 20px;
    background: rgba(40, 167, 69, 0.1);
    border-radius: var(--border-radius);
    margin: 20px 0;
}

/* ===== OVERDUE BADGE ===== */
.overdue-badge-container {
    text-align: center;
    margin: 20px 0;
}

.overdue-badge {
    display: inline-block;
    padding: 12px 30px;
    background: var(--danger-color);
    color: white;
    border-radius: 25px;
    font-weight: 700;
}

/* ===== TABLES ===== */
.table-container {
    margin: 30px 0;
    overflow-x: auto;
    display: none; /* Hidden by default, shown via JS */
}

.payments-table,
.warnings-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.payments-table th,
.payments-table td,
.warnings-table th,
.warnings-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

.payments-table th,
.warnings-table th {
    background: var(--light-gray);
    font-weight: 700;
    color: var(--dark-gray);
}

.paid-row {
    background: rgba(40, 167, 69, 0.05);
}

.overdue-row {
    background: rgba(229, 57, 53, 0.05);
}

.highlight-fine {
    background: rgba(255, 193, 7, 0.1);
}

.highlight-negative {
    background: rgba(229, 57, 53, 0.1);
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 800px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: black;
}

.warning-alert-box {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
}

.modal-scroll-content {
    max-height: 400px;
    overflow-y: auto;
}

.pay-fine-btn {
    background: var(--success-color);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    margin-left: 8px;
    transition: background var(--transition-speed);
}

.pay-fine-btn:hover {
    background: #218838;
}

.paid-label {
    color: var(--success-color);
    font-weight: bold;
}

/* ===== MAINTENANCE CARD ===== */
.maintenance-card {
    margin-top: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    border-radius: var(--border-radius);
    text-align: center;
}

.maintenance-card-title {
    font-size: 1.5em;
    font-weight: 900;
    margin-bottom: 15px;
    color: var(--dark-gray);
}

.maintenance-card-description {
    margin-bottom: 20px;
    color: #666;
}

.maintenance-button {
    display: inline-block;
    padding: 15px 30px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 700;
    transition: all var(--transition-speed);
}

.maintenance-button:hover {
    background: #357abd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.emergency-button {
    background: var(--danger-color) !important;
    margin-top: 10px;
}

.emergency-button:hover {
    background: #c62828 !important;
}

.emergency-countdown {
    margin-top: 10px;
    font-weight: bold;
    color: var(--danger-color);
    display: none;
}

/* ===== POPUP (EASTER EGG) ===== */
.popup {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}

.popup-content {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    max-width: 500px;
    position: relative;
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close-popup:hover {
    color: black;
}

.popup-meme {
    display: none;
    width: 100%;
    max-width: 400px;
    margin-top: 20px;
    border-radius: var(--border-radius);
}

/* ===== FOOTER ===== */
.membership-card-footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    color: #666;
}

.membership-card-footer a {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
}

.membership-card-footer img {
    height: 1.5em;
    width: auto;
    margin-left: 5px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .lmv-membership-card-v2 {
        padding: 10px;
    }
    
    .membership-card-header {
        padding: 20px;
    }
    
    .room-title {
        font-size: 1.5em;
    }
    
    .membership-card-info p {
        flex-direction: column;
        gap: 5px;
    }
    
    .gamipress-banner-container {
        flex-direction: column;
    }
    
    .room-status-badges {
        flex-direction: column;
        align-items: stretch;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
}
