/* 
 * UNIFIED DARK THEME - COMPREHENSIVE STYLING FOR ENTIRE SITE
 * Heavy Glassmorphism with 3D Effects and Cursor Reactivity
 * Applied to ALL pages: login, auth, AI pages, admin, etc.
 */

/* ===== GLOBAL RESET AND BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
}

/* ===== UNIFIED CONTAINER STYLES ===== */
.container, .main-container, .page-container, .content-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 10;
}

/* ===== UNIFIED CARD/BOX STYLES ===== */
.card, .box, .panel, .widget, .postcard, .post-card, .content-box, .form-container, .login-box, .auth-box, .admin-panel, .dashboard-card, .ai-panel, .news-card, .message-box, .alert-box, .notification-box {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.8),
        0 10px 40px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
}

/* ===== UNIFIED HOVER EFFECTS ===== */
.card:hover, .box:hover, .panel:hover, .widget:hover, .postcard:hover, .post-card:hover, .content-box:hover, .form-container:hover, .login-box:hover, .auth-box:hover, .admin-panel:hover, .dashboard-card:hover, .ai-panel:hover, .news-card:hover, .message-box:hover, .alert-box:hover, .notification-box:hover {
    transform: translateY(-25px) rotateX(8deg) rotateY(8deg) scale(1.02);
    box-shadow: 
        0 40px 120px rgba(0, 0, 0, 0.9),
        0 20px 60px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5),
        0 0 80px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ===== CURSOR-REACTIVE EFFECTS ===== */
.card::after, .box::after, .panel::after, .widget::after, .postcard::after, .post-card::after, .content-box::after, .form-container::after, .login-box::after, .auth-box::after, .admin-panel::after, .dashboard-card::after, .ai-panel::after, .news-card::after, .message-box::after, .alert-box::after, .notification-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 255, 255, 0.15) 0%,
        transparent 50%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
    border-radius: 25px;
}

.card:hover::after, .box:hover::after, .panel:hover::after, .widget:hover::after, .postcard:hover::after, .post-card:hover::after, .content-box:hover::after, .form-container:hover::after, .login-box:hover::after, .auth-box:hover::after, .admin-panel:hover::after, .dashboard-card:hover::after, .ai-panel:hover::after, .news-card:hover::after, .message-box:hover::after, .alert-box:hover::after, .notification-box:hover::after {
    opacity: 1;
}

/* ===== UNIFIED FORM STYLES ===== */
input, textarea, select, .form-control, .form-input, .input-field, .text-input, .password-input, .email-input, .search-input {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

input:focus, textarea:focus, select:focus, .form-control:focus, .form-input:focus, .input-field:focus, .text-input:focus, .password-input:focus, .email-input:focus, .search-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 20px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

input::placeholder, textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* ===== UNIFIED BUTTON STYLES ===== */
button, .btn, .button, .submit-btn, .login-btn, .auth-btn, .admin-btn, .ai-btn, .action-btn, .primary-btn, .secondary-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 15px 30px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

button:hover, .btn:hover, .button:hover, .submit-btn:hover, .login-btn:hover, .auth-btn:hover, .admin-btn:hover, .ai-btn:hover, .action-btn:hover, .primary-btn:hover, .secondary-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 30px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

button:active, .btn:active, .button:active, .submit-btn:active, .login-btn:active, .auth-btn:active, .admin-btn:active, .ai-btn:active, .action-btn:active, .primary-btn:active, .secondary-btn:active {
    transform: translateY(-2px) scale(1.02);
}

/* ===== UNIFIED HEADER STYLES ===== */
h1, h2, h3, h4, h5, h6, .title, .heading, .page-title, .section-title, .card-title, .post-title, .news-title, .ai-title, .admin-title {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

h1, .title, .page-title {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #ffffff, #cccccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2, .section-title {
    font-size: 2rem;
}

h3, .card-title, .post-title, .news-title, .ai-title, .admin-title {
    font-size: 1.5rem;
}

/* ===== UNIFIED TEXT STYLES ===== */
p, .text, .content, .description, .body-text, .post-content, .news-content, .ai-content, .admin-content {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: 15px;
}

a, .link, .nav-link, .menu-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

a:hover, .link:hover, .nav-link:hover, .menu-link:hover {
    color: rgba(255, 255, 255, 1);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* ===== UNIFIED NAVIGATION STYLES ===== */
nav, .navbar, .navigation, .menu, .nav-menu, .admin-nav, .ai-nav {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(30px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-item, .menu-item, .nav-link, .menu-link {
    padding: 10px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
    margin: 0 5px;
}

.nav-item:hover, .menu-item:hover, .nav-link:hover, .menu-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* ===== UNIFIED TABLE STYLES ===== */
table, .table, .data-table, .admin-table, .ai-table, .news-table {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

th, .table-header, .header-cell {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    padding: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

td, .table-cell, .data-cell {
    padding: 15px;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

tr:hover, .table-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ===== UNIFIED MODAL STYLES ===== */
.modal, .popup, .dialog, .overlay, .lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content, .popup-content, .dialog-content {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(30px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 30px;
    max-width: 90%;
    max-height: 90%;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.9),
        0 10px 40px rgba(0, 0, 0, 0.6);
}

/* ===== UNIFIED ALERT/NOTIFICATION STYLES ===== */
.alert, .notification, .message, .warning, .error, .success, .info {
    padding: 20px;
    border-radius: 15px;
    margin: 15px 0;
    backdrop-filter: blur(20px);
    border: 2px solid;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.alert-success, .notification-success, .message-success, .success {
    background: rgba(40, 167, 69, 0.2);
    border-color: rgba(40, 167, 69, 0.3);
    color: rgba(40, 167, 69, 0.9);
}

.alert-error, .notification-error, .message-error, .error {
    background: rgba(220, 53, 69, 0.2);
    border-color: rgba(220, 53, 69, 0.3);
    color: rgba(220, 53, 69, 0.9);
}

.alert-warning, .notification-warning, .message-warning, .warning {
    background: rgba(255, 193, 7, 0.2);
    border-color: rgba(255, 193, 7, 0.3);
    color: rgba(255, 193, 7, 0.9);
}

.alert-info, .notification-info, .message-info, .info {
    background: rgba(23, 162, 184, 0.2);
    border-color: rgba(23, 162, 184, 0.3);
    color: rgba(23, 162, 184, 0.9);
}

/* ===== UNIFIED GRID STYLES ===== */
.grid, .grid-container, .post-grid, .news-grid, .ai-grid, .admin-grid {
    display: grid;
    gap: 25px;
    margin: 20px 0;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ===== UNIFIED FLEX STYLES ===== */
.flex, .flex-container, .row, .column {
    display: flex;
    gap: 20px;
    align-items: center;
}

.flex-column, .column {
    flex-direction: column;
}

.flex-center {
    justify-content: center;
    align-items: center;
}

.flex-between {
    justify-content: space-between;
}

.flex-wrap {
    flex-wrap: wrap;
}

/* ===== UNIFIED SPACING ===== */
.p-0 { padding: 0; }
.p-1 { padding: 10px; }
.p-2 { padding: 20px; }
.p-3 { padding: 30px; }
.p-4 { padding: 40px; }

.m-0 { margin: 0; }
.m-1 { margin: 10px; }
.m-2 { margin: 20px; }
.m-3 { margin: 30px; }
.m-4 { margin: 40px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }

/* ===== UNIFIED RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .container, .main-container, .page-container, .content-container {
        padding: 15px;
    }
    
    h1, .title, .page-title {
        font-size: 2rem;
    }
    
    h2, .section-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .container, .main-container, .page-container, .content-container {
        padding: 10px;
    }
    
    .card, .box, .panel, .widget, .postcard, .post-card, .content-box, .form-container, .login-box, .auth-box, .admin-panel, .dashboard-card, .ai-panel, .news-card, .message-box, .alert-box, .notification-box {
        border-radius: 20px;
        padding: 20px;
    }
    
    h1, .title, .page-title {
        font-size: 1.8rem;
    }
    
    h2, .section-title {
        font-size: 1.3rem;
    }
    
    h3, .card-title, .post-title, .news-title, .ai-title, .admin-title {
        font-size: 1.2rem;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container, .main-container, .page-container, .content-container {
        padding: 5px;
    }
    
    .card, .box, .panel, .widget, .postcard, .post-card, .content-box, .form-container, .login-box, .auth-box, .admin-panel, .dashboard-card, .ai-panel, .news-card, .message-box, .alert-box, .notification-box {
        border-radius: 15px;
        padding: 15px;
    }
    
    h1, .title, .page-title {
        font-size: 1.5rem;
    }
    
    h2, .section-title {
        font-size: 1.2rem;
    }
    
    h3, .card-title, .post-title, .news-title, .ai-title, .admin-title {
        font-size: 1.1rem;
    }
}

/* ===== UNIFIED ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
}

.scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

/* ===== UNIFIED LOADING STATES ===== */
.loading, .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: rgba(255, 255, 255, 0.9);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== UNIFIED SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ===== UNIFIED SELECTION ===== */
::selection {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 1);
}

/* ===== UNIFIED FOCUS STYLES ===== */
*:focus {
    outline: 2px solid rgba(255, 255, 255, 0.3);
    outline-offset: 2px;
}

/* ===== UNIFIED PRINT STYLES ===== */
@media print {
    .card, .box, .panel, .widget, .postcard, .post-card, .content-box, .form-container, .login-box, .auth-box, .admin-panel, .dashboard-card, .ai-panel, .news-card, .message-box, .alert-box, .notification-box {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    * {
        background: white !important;
        color: black !important;
    }
}

/* ===== UNIFIED ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    .card, .box, .panel, .widget, .postcard, .post-card, .content-box, .form-container, .login-box, .auth-box, .admin-panel, .dashboard-card, .ai-panel, .news-card, .message-box, .alert-box, .notification-box {
        border-color: rgba(255, 255, 255, 0.5);
    }
    
    input, textarea, select, .form-control, .form-input, .input-field, .text-input, .password-input, .email-input, .search-input {
        border-color: rgba(255, 255, 255, 0.5);
    }
}


