:root {
    --bg: #0b0d12;
    --bg-soft: #11141b;
    --card: rgba(255, 255, 255, .06);
    --border: rgba(255, 255, 255, .12);
    --text: #f1f5f9;
    --muted: #94a3b8;
    --primary: #00e5ff;
    --accent: #22c55e;
    --radius: 18px;
    --danger: #ff4757;
    --warning: #ffd93d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(180deg, #07090f, var(--bg));
    color: var(--text);
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

section {
    padding: 110px 20px;
}

.container {
    max-width: 1200px;
    margin: auto;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 12, 18, .8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    z-index: 1000;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
}

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

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-link {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 15px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.admin-link:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(0, 229, 255, 0.1);
}

/* Admin Badge */
.badge {
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-left: 5px;
    animation: badgePulse 2s infinite;
}

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

#menu-toggle {
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.6rem;
    cursor: pointer;
    transition: color 0.3s;
}

#menu-toggle:hover {
    color: var(--primary);
}

/* Drawer */
#drawer {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: #0c0f16;
    border-right: 1px solid var(--border);
    padding: 26px;
    transition: .35s;
    z-index: 2000;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

#close-menu {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    transition: color 0.3s;
}

#close-menu:hover {
    color: var(--primary);
}

#drawer ul {
    list-style: none;
    margin: 40px 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

#drawer a {
    color: var(--muted);
    font-weight: 600;
    transition: color 0.3s;
    padding: 8px 0;
    display: block;
    position: relative;
}

#drawer a:hover {
    color: var(--primary);
}

#drawer a.admin-panel-link {
    color: var(--primary);
    border-left: 3px solid var(--primary);
    padding-left: 10px;
}

#drawer a.admin-panel-link::after {
    content: "👑";
    margin-left: 8px;
    font-size: 0.9em;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: 14px 26px;
    font-weight: 700;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #000;
    border: none;
    cursor: pointer;
    transition: .3s;
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 229, 255, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #000;
}

.btn-secondary {
    background: var(--bg-soft);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--card);
    border-color: var(--primary);
}

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

.btn-danger:hover {
    background: #ff3742;
    transform: translateY(-4px);
}

.btn-warning {
    background: var(--warning);
    color: #000;
}

.btn-warning:hover {
    background: #ffcc00;
}

/* Cards */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: .3s;
    height: 100%;
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: .7s;
}

.reveal.active {
    opacity: 1;
    transform: none;
}

/* Typography */
h1, h2, h3 {
    font-weight: 800;
    line-height: 1.2;
}

h1 {
    font-size: 2.7rem;
    margin: 20px 0 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

p {
    color: var(--muted);
    line-height: 1.6;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
}

/* Button Group */
.button-group {
    margin-top: 30px;
    display: flex;
    gap: 18px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.1);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--muted);
    opacity: 0.7;
}

.contact-form button {
    width: fit-content;
    align-self: center;
    margin-top: 10px;
}

.status {
    margin-top: 10px;
    text-align: center;
    min-height: 24px;
    font-weight: 600;
    padding: 10px;
    border-radius: var(--radius);
    transition: all 0.3s;
}

.status.success {
    color: var(--accent);
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status.error {
    color: var(--danger);
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.status.sending {
    color: var(--warning);
    background: rgba(255, 217, 61, 0.1);
    border: 1px solid rgba(255, 217, 61, 0.3);
}

/* Footer */
footer {
    background: #0c0f16;
    border-top: 1px solid var(--border);
    padding: 70px 20px 40px;
    text-align: center;
}

.social-links {
    margin: 26px 0;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.copyright {
    font-size: .85rem;
    opacity: .6;
    margin-top: 20px;
}

/* Admin Panel Styles */
.admin-panel {
    padding-top: 100px;
    min-height: 100vh;
}

.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-form input {
    padding: 15px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text);
    font-size: 1rem;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.login-form button {
    margin-top: 10px;
}

/* Message Cards in Admin */
.message-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 20px;
    transition: transform 0.3s;
}

.message-card:hover {
    transform: translateX(5px);
    border-color: var(--primary);
}

.message-card.unread {
    border-left: 5px solid var(--primary);
    background: rgba(0, 229, 255, 0.05);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

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

.message-time {
    color: var(--muted);
    font-size: 0.9rem;
}

.message-content {
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 15px;
    white-space: pre-line;
}

.message-phone {
    color: var(--accent);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.message-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 8px 15px;
    border-radius: var(--radius);
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.action-btn:hover {
    background: var(--primary);
    color: #000;
}

.action-btn.delete:hover {
    background: var(--danger);
    color: white;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    border: 1px solid var(--border);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin: 10px 0;
}

.stat-label {
    color: var(--muted);
    font-size: 0.9rem;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 15px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text);
    min-width: 200px;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

.no-messages {
    text-align: center;
    padding: 50px;
    color: var(--muted);
}

.export-btn {
    background: var(--accent);
    color: #000;
}

.logout-btn {
    background: var(--danger);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    section {
        padding: 80px 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .button-group {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .header-right {
        gap: 10px;
    }
    
    .admin-link span {
        display: none;
    }
    
    .admin-link {
        padding: 8px 12px;
    }
    
    .admin-link i {
        margin: 0;
    }
    
    .filter-controls {
        flex-direction: column;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .message-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .message-actions {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    header {
        padding: 12px 15px;
    }
    
    .logo {
        font-size: 1.2rem;
    }
}

/* Animation for new messages */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.new-message {
    animation: pulse 0.5s ease-in-out 2;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--muted);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

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

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ===== NOTIFICATION SYSTEM STYLES ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 15px 20px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transform: translateX(400px);
    transition: transform 0.3s ease-out;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    overflow: hidden;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left: 4px solid var(--accent);
    background: rgba(34, 197, 94, 0.1);
}

.notification-error {
    border-left: 4px solid var(--danger);
    background: rgba(255, 71, 87, 0.1);
}

.notification-warning {
    border-left: 4px solid var(--warning);
    background: rgba(255, 217, 61, 0.1);
}

.notification-info {
    border-left: 4px solid var(--primary);
    background: rgba(0, 229, 255, 0.1);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.notification-icon {
    font-size: 1.2rem;
    min-width: 24px;
    text-align: center;
}

.notification-message {
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.4;
    flex: 1;
}

.notification-close {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 5px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.notification-close:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

/* Progress bar for notifications */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 0 0 var(--radius) var(--radius);
    width: 100%;
    transform-origin: left;
    animation: progressBar 5s linear forwards;
}

.notification-success .notification-progress {
    background: var(--accent);
}

.notification-error .notification-progress {
    background: var(--danger);
}

.notification-warning .notification-progress {
    background: var(--warning);
}

.notification-info .notification-progress {
    background: var(--primary);
}

@keyframes progressBar {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Animation for notification */
@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* WhatsApp-style ticks */
.tick-animation {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    padding: 10px;
}

.tick {
    opacity: 0.3;
    font-size: 1.2em;
    transition: all 0.5s ease;
    color: var(--muted);
}

.tick.sent {
    opacity: 1;
    color: var(--muted);
}

.tick.delivered {
    opacity: 1;
    color: var(--accent);
}

.tick.read {
    opacity: 1;
    color: var(--primary);
}

/* Mobile notifications */
@media (max-width: 768px) {
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        min-width: auto;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
    
    @keyframes slideInTop {
        from {
            transform: translateY(-100px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    @keyframes slideOutTop {
        from {
            transform: translateY(0);
            opacity: 1;
        }
        to {
            transform: translateY(-100px);
            opacity: 0;
        }
    }
}

/* Badge pulse animation */
@keyframes badgePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(255, 71, 87, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0);
    }
}

/* Success animation */
@keyframes successPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.notification-success .notification-icon {
    animation: successPulse 0.5s ease-in-out;
}

/* Error animation */
@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
    20%, 40%, 60%, 80% { transform: translateX(2px); }
}

.notification-error .notification-icon {
    animation: errorShake 0.5s ease-in-out;
}

/* Info animation */
@keyframes infoSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.notification-info .notification-icon {
    animation: infoSpin 1s ease-in-out;
}

/* Notification stack for multiple notifications */
.notification-stack {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 80vh;
    overflow-y: auto;
}

.notification-stack .notification {
    position: relative;
    top: 0;
    right: 0;
    margin-bottom: 10px;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .notification {
        background: rgba(20, 22, 30, 0.95);
    }
}

/* Print styles */
@media print {
    .notification {
        display: none !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .notification {
        border: 2px solid var(--border);
    }
    
    .notification-success {
        border-left: 4px solid #00ff00;
    }
    
    .notification-error {
        border-left: 4px solid #ff0000;
    }
    
    .notification-warning {
        border-left: 4px solid #ffff00;
    }
    
    .notification-info {
        border-left: 4px solid #00ffff;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .notification,
    .badge,
    .notification-progress,
    .tick,
    .notification-icon {
        animation: none !important;
        transition: none !important;
    }
    
    .notification {
        transform: translateX(0) !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .notification-close {
        width: 32px;
        height: 32px;
    }
    
    .notification {
        padding: 20px;
        min-width: auto;
    }
}

/* Loading state for submit button */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    border-top-color: #000;
    animation: spin 1s ease-in-out infinite;
}

/* Form validation styles */
.contact-form input:invalid,
.contact-form textarea:invalid {
    border-color: var(--danger);
}

.contact-form input:valid,
.contact-form textarea:valid {
    border-color: var(--accent);
}

.contact-form input:focus:invalid,
.contact-form textarea:focus:invalid {
    box-shadow: 0 0 0 2px rgba(255, 71, 87, 0.1);
}

.contact-form input:focus:valid,
.contact-form textarea:focus:valid {
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.1);
}
