/* ============================================
   Triangle SA - Maintenance Page Styles
   ============================================ */

/* === Base === */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #0a0a0a;
    color: #fff;
}

/* === Background Grid === */
.bg-grid {
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* === Floating Orbs === */
.floating-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: floatOrb 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--color-accent, #22c55e);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--color-danger, #ef4444);
    bottom: -5%;
    right: -5%;
    animation-delay: -7s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--color-accent, #22c55e);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
    opacity: 0.08;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -50px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(50px, 30px) scale(1.02); }
}

/* === Particles === */
.particle-field {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--color-accent, #22c55e);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 8s ease-in-out infinite;
}

@keyframes particleFloat {
    0% { opacity: 0; transform: translateY(100vh) scale(0); }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { opacity: 0; transform: translateY(-20vh) scale(1); }
}

/* === Glass Card === */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        0 4px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* === Countdown Cards === */
.countdown-card {
    position: relative;
}

.countdown-card-inner {
    position: relative;
    width: 90px;
    height: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .countdown-card-inner {
        width: 120px;
        height: 140px;
        border-radius: 20px;
    }
}

.countdown-card:hover .countdown-card-inner {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-4px);
}

.countdown-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    border-radius: 0 0 10px 10px;
    opacity: 0.6;
    filter: blur(1px);
}

.countdown-number {
    font-family: 'Space Grotesk', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .countdown-number {
        font-size: 2.8rem;
    }
}

.countdown-number.flip {
    animation: flipDigit 0.6s ease-in-out;
}

@keyframes flipDigit {
    0% { transform: perspective(200px) rotateX(0deg); opacity: 1; }
    50% { transform: perspective(200px) rotateX(-90deg); opacity: 0; }
    51% { transform: perspective(200px) rotateX(90deg); opacity: 0; }
    100% { transform: perspective(200px) rotateX(0deg); opacity: 1; }
}

.countdown-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 8px;
    font-weight: 500;
}

@media (min-width: 768px) {
    .countdown-label {
        font-size: 0.7rem;
    }
}

.countdown-separator {
    display: flex;
    align-items: center;
    padding-bottom: 20px;
}

.countdown-separator span {
    font-family: 'Space Grotesk', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.2);
    animation: pulseSeparator 1s ease-in-out infinite;
}

@keyframes pulseSeparator {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.6; }
}

/* === Newsletter Button === */
.newsletter-btn {
    position: relative;
    overflow: hidden;
}

.newsletter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.newsletter-btn:hover::before {
    left: 100%;
}

/* === Social Link Card === */
.social-link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* === Logo Container === */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === Animations === */
.animate-fade-in-down {
    opacity: 0;
    animation: fadeInDown 0.8s ease forwards;
}

.animate-fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Pulse glow on countdown update === */
.countdown-card-inner.pulse-glow {
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.15);
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* === Toast Notification === */
.toast-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    z-index: 9999;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #fff;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
}

.toast-notification.success {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.3);
}

.toast-notification.error {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
}

/* ============================================
   Admin Panel Styles
   ============================================ */

/* === Admin Sidebar === */
.admin-sidebar {
    background: linear-gradient(180deg, #111827, #0f172a);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-sidebar .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.admin-sidebar .nav-item:hover,
.admin-sidebar .nav-item.active {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.admin-sidebar .nav-item.active {
    border-left: 3px solid var(--color-accent, #22c55e);
}

/* === Admin Input === */
.admin-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 14px;
    color: #fff;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    outline: none;
}

.admin-input:focus {
    border-color: var(--color-accent, #22c55e);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.admin-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

/* === Admin Button === */
.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-btn-primary {
    background: var(--color-accent, #22c55e);
}

.admin-btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.admin-btn-danger {
    background: var(--color-danger, #ef4444);
}

.admin-btn-danger:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.admin-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.admin-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* === Admin Card === */
.admin-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
}

/* === Admin Color Picker === */
.color-picker-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-picker-wrapper input[type="color"] {
    width: 44px;
    height: 44px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    cursor: pointer;
    background: transparent;
    padding: 2px;
}

.color-picker-wrapper input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.color-picker-wrapper input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

/* === Admin Table === */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-weight: 600;
}

.admin-table td {
    padding: 12px 16px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.admin-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* === Admin Badge === */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* === Admin Toggle Switch === */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--color-accent, #22c55e);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* === Loading Spinner === */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === Modal === */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}
