/**
 * Custom Styles for Hostarai Portal
 * Light Theme with 3D Effects
 */

:root {
    --gradient-primary: linear-gradient(135deg, #0ea5e9 0%, #d946ef 100%);
    --gradient-secondary: linear-gradient(135deg, #38bdf8 0%, #e879f9 100%);
    --gradient-light: linear-gradient(135deg, #e0f2fe 0%, #fae8ff 100%);
    --shadow-3d: 0 10px 30px rgba(14, 165, 233, 0.2);
    --shadow-3d-hover: 0 15px 40px rgba(14, 165, 233, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Prompt', sans-serif;
    overflow-x: hidden;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f0f9ff;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0ea5e9, #d946ef);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0284c7, #c026d3);
}

/* 3D Card Effects */
.card-3d {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.card-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card-3d:hover::before {
    transform: scaleX(1);
}

.card-3d:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(14, 165, 233, 0.25);
}

/* 3D Button */
.btn-3d {
    position: relative;
    padding: 12px 32px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    z-index: 1;
}

.btn-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    z-index: -1;
    transition: transform 0.3s ease;
}

.btn-3d:hover::before {
    transform: scale(1.1);
}

.btn-3d:active {
    transform: scale(0.95);
}

/* Gradient Text */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 3D Cube Animation */
@keyframes rotate3d {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }
    100% {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

.cube-3d {
    width: 100px;
    height: 100px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate3d 20s infinite linear;
}

.cube-face {
    position: absolute;
    width: 100px;
    height: 100px;
    background: var(--gradient-secondary);
    opacity: 0.8;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

/* Gradient Border */
.gradient-border {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 2px;
    background: var(--gradient-primary);
}

.gradient-border-inner {
    background: white;
    border-radius: 14px;
    padding: 1.5rem;
}

/* Glass Morphism */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(14, 165, 233, 0.1);
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 280px;
    background: white;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    z-index: 50;
    overflow-y: auto;
}

.sidebar-hidden {
    transform: translateX(-100%);
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
    }
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    margin: 4px 12px;
    border-radius: 12px;
    color: #64748b;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sidebar-menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gradient-primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.sidebar-menu-item:hover,
.sidebar-menu-item.active {
    background: linear-gradient(135deg, #e0f2fe 0%, #fae8ff 100%);
    color: #0ea5e9;
}

.sidebar-menu-item.active::before {
    transform: scaleY(1);
}

/* Content Area with Sidebar */
.content-with-sidebar {
    margin-left: 280px;
    transition: margin-left 0.3s ease;
}

@media (max-width: 768px) {
    .content-with-sidebar {
        margin-left: 0;
    }
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-primary {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
}

.badge-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.badge-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.badge-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.badge-info {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
}

.badge-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}

/* Table Styles */
.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table-modern thead th {
    background: var(--gradient-light);
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #0369a1;
    border: none;
}

.table-modern tbody tr {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.table-modern tbody tr:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
}

.table-modern tbody td {
    padding: 16px;
    border: none;
}

.table-modern tbody tr td:first-child {
    border-radius: 12px 0 0 12px;
}

.table-modern tbody tr td:last-child {
    border-radius: 0 12px 12px 0;
}

/* Form Styles */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0f2fe;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #334155;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0f2fe;
    border-top-color: #0ea5e9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Notification Toast */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 60;
    background: white;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
}

/* Responsive Grid */
.grid-responsive {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

/* Stats Card */
.stats-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.stats-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: var(--gradient-secondary);
    opacity: 0.1;
    border-radius: 50%;
    transform: translate(30%, -30%);
}

/* Package Card */
.package-card {
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    border: 2px solid transparent;
}

.package-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 50px rgba(14, 165, 233, 0.2);
    border-color: #0ea5e9;
}

.package-card.recommended {
    border: 2px solid #0ea5e9;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
}

.package-card.recommended::before {
    content: 'แนะนำ';
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--gradient-primary);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 12px 0;
    display: flex;
    align-items: center;
    color: #475569;
}

.feature-list li::before {
    content: '✓';
    display: inline-block;
    width: 24px;
    height: 24px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    margin-right: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

/* Utility Classes */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient {
    background: var(--gradient-primary);
}

.shadow-3d {
    box-shadow: var(--shadow-3d);
}

.shadow-3d-hover:hover {
    box-shadow: var(--shadow-3d-hover);
}
