/* 
   Estia Sea Offers - Design System Stylesheet
   Theme: Sleek Dark Glassmorphism with Cyberpunk Glows
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --bg-base: #030712;
    --bg-surface: rgba(17, 24, 39, 0.6);
    --bg-surface-hover: rgba(31, 41, 55, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-glow: rgba(0, 242, 254, 0.3);
    
    --primary: #00f2fe;
    --primary-gradient: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    --accent: #a18cd1;
    --accent-gradient: linear-gradient(135deg, #fbc2eb 0%, #a18cd1 100%);
    --danger: #ff4757;
    --danger-gradient: linear-gradient(135deg, #ff4757 0%, #ff6b81 100%);
    --success: #2ed573;
    --success-gradient: linear-gradient(135deg, #2ed573 0%, #7bed9f 100%);
    --warning: #ffa502;
    
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
    
    /* Shadows & Blurs */
    --glow-shadow: 0 0 20px rgba(0, 242, 254, 0.25);
    --glow-shadow-danger: 0 0 20px rgba(255, 71, 87, 0.25);
    --glass-blur: blur(16px);
    --transition-speed: 0.3s;
}

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

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Glowing Orbs */
body::before, body::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
}

body::before {
    top: 10%;
    left: 15%;
    background: var(--primary);
}

body::after {
    bottom: 10%;
    right: 15%;
    background: var(--accent);
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Glassmorphism Container */
.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed), transform var(--transition-speed);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

/* Headers */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Custom Navigation */
header {
    border-bottom: 1px solid var(--border-color);
    background: rgba(3, 7, 18, 0.6);
    backdrop-filter: var(--glass-blur);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color var(--transition-speed);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow var(--transition-speed), filter var(--transition-speed);
    border: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--primary-gradient);
    color: #030712;
    box-shadow: 0 4px 14px 0 rgba(0, 242, 254, 0.2);
}

.btn-primary:hover {
    box-shadow: var(--glow-shadow);
    filter: brightness(1.1);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-secondary);
}

.btn-danger {
    background: var(--danger-gradient);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(255, 71, 87, 0.2);
}

.btn-danger:hover {
    box-shadow: var(--glow-shadow-danger);
    filter: brightness(1.1);
}

/* Public Landing Page Hero */
.hero {
    padding: 100px 0 60px 0;
    text-align: center;
    position: relative;
}

.hero-tag {
    display: inline-block;
    background: rgba(0, 242, 254, 0.1);
    color: var(--primary);
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    animation: pulse 2s infinite;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(to right, #ffffff, #a18cd1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 32px auto;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 60px 0;
}

.feature-card {
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    transition: transform var(--transition-speed), border-color var(--transition-speed);
}

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

.feature-icon {
    font-size: 2rem;
    margin-bottom: 16px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.feature-card h3 {
    margin-bottom: 12px;
    font-size: 1.25rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Admin Dashboard CSS */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 32px;
}

@media (min-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 3fr 1fr;
    }
}

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

.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-card .label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--primary);
}

/* Admin Controls & Filters */
.admin-toolbar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    align-items: stretch;
}

@media (min-width: 768px) {
    .admin-toolbar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--transition-speed);
}

.search-box input:focus {
    border-color: var(--primary);
}

.search-box svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 16px;
    height: 16px;
}

/* Data Table Styles */
.table-responsive {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.01);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

th {
    background: rgba(255, 255, 255, 0.03);
    padding: 16px 20px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-heading);
}

td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.code-badge {
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.2);
    color: var(--primary);
    padding: 4px 8px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: 600;
}

.url-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-secondary);
}

.url-cell a {
    color: var(--accent);
    text-decoration: none;
}

.url-cell a:hover {
    text-decoration: underline;
}

/* Form Controls */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: var(--font-heading);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 8px 0 rgba(0, 242, 254, 0.15);
}

/* Premium Dynamic Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    width: 100%;
    max-width: 600px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 40px 0 rgba(0,0,0,0.5);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color var(--transition-speed);
}

.close-btn:hover {
    color: var(--danger);
}

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    border-left: 4px solid var(--primary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    padding: 16px 24px;
    border-radius: 0 8px 8px 0;
    color: var(--text-primary);
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    min-width: 280px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.toast-success {
    border-left-color: var(--success);
}

.toast.toast-danger {
    border-left-color: var(--danger);
}

/* Preview Card Component (inside Modal) */
.preview-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 12px;
}

.preview-img-container {
    width: 100%;
    height: 150px;
    background: #111827;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.preview-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-img-fallback {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.preview-content {
    padding: 16px;
}

.preview-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.preview-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Actions Menu */
.action-buttons {
    display: flex;
    gap: 8px;
}

.icon-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-speed);
}

.icon-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(0, 242, 254, 0.05);
}

.icon-btn.delete:hover {
    color: var(--danger);
    border-color: var(--danger);
    background: rgba(255, 71, 87, 0.05);
}

/* Animations */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 242, 254, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 242, 254, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 242, 254, 0);
    }
}

@keyframes slideIn {
    from {
        transform: translateY(20px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Redirection Screen (If they see it) */
.redirect-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    text-align: center;
}

.loader {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(0, 242, 254, 0.1);
    border-radius: 50%;
    display: inline-block;
    border-top-color: var(--primary);
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    margin-bottom: 24px;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
