/* o9o.ai Premium Dark Grey Design */

:root {
    --primary-grey: #2C2C2E;
    --secondary-grey: #3A3A3C;
    --dark-grey: #1C1C1E;
    --light-grey: #8E8E93;
    --white: #FFFFFF;
    --black: #000000;
    --accent-grey: #48484A;
    --border-grey: #38383A;
    --text-primary: #FFFFFF;
    --text-secondary: #E5E5E7;
    --border-radius: 8px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --neon-glow: 0 0 10px rgba(255, 255, 255, 0.3);
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--black);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Enhanced animated background - only for landing page */
body.landing-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(72, 72, 74, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(72, 72, 74, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(72, 72, 74, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 60% 60%, rgba(255, 255, 255, 0.05) 0%, transparent 30%),
        radial-gradient(circle at 10% 90%, rgba(72, 72, 74, 0.08) 0%, transparent 40%);
    animation: backgroundFloat 15s ease-in-out infinite;
    z-index: -1;
}

@keyframes backgroundFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    25% {
        transform: translate(-40px, -40px) scale(1.2) rotate(5deg);
    }
    50% {
        transform: translate(40px, 40px) scale(0.8) rotate(-5deg);
    }
    75% {
        transform: translate(-20px, 20px) scale(1.1) rotate(3deg);
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Navigation */
.navbar {
    background-color: var(--primary-grey) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-grey);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--white) !important;
    transition: var(--transition);
}

.navbar-brand:hover {
    color: var(--light-grey) !important;
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary) !important;
    transition: var(--transition);
    position: relative;
    padding: 8px 16px !important;
    border-radius: var(--border-radius);
}

.nav-link:hover {
    color: var(--white) !important;
    background-color: var(--secondary-grey);
    transform: translateY(-1px);
}

.nav-link.active {
    color: var(--white) !important;
    background-color: var(--accent-grey);
}

/* Cards */
.card {
    background-color: var(--primary-grey);
    border: 1px solid var(--border-grey);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--white), transparent);
    opacity: 0;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), var(--neon-glow);
    border-color: var(--accent-grey);
}

.card:hover::before {
    opacity: 1;
    animation: neonFlow 2s ease-in-out infinite;
}

@keyframes neonFlow {
    0%, 100% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
}

.card-header {
    background-color: var(--secondary-grey);
    color: var(--white);
    border-bottom: 1px solid var(--border-grey);
    font-weight: 600;
    padding: 20px;
}

.card-body {
    padding: 24px;
    color: var(--text-primary);
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 600;
    padding: 12px 24px;
    transition: var(--transition);
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background-color: var(--accent-grey);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(72, 72, 74, 0.3);
}

.btn-primary:hover {
    background-color: var(--light-grey);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 72, 74, 0.4);
}

.btn-success {
    background-color: #34C759;
    color: var(--white);
    box-shadow: 0 4px 15px rgba(52, 199, 89, 0.3);
}

.btn-success:hover {
    background-color: #30D158;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 199, 89, 0.4);
}

.btn-warning {
    background-color: #FF9500;
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 149, 0, 0.3);
}

.btn-warning:hover {
    background-color: #FF9F0A;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 149, 0, 0.4);
}

.btn-danger {
    background-color: #FF3B30;
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 59, 48, 0.3);
}

.btn-danger:hover {
    background-color: #FF453A;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 59, 48, 0.4);
}

.btn-outline-light {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--light-grey);
}

.btn-outline-light:hover {
    background-color: var(--light-grey);
    color: var(--black);
    transform: translateY(-2px);
}

/* Forms */
.form-control {
    background-color: var(--secondary-grey);
    border: 2px solid var(--border-grey);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    padding: 12px 16px;
    font-size: 16px;
    transition: var(--transition);
}

.form-control:focus {
    background-color: var(--primary-grey);
    border-color: var(--accent-grey);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(72, 72, 74, 0.2), var(--neon-glow);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-secondary);
}

/* Ensure all text is white */
.form-control, .form-control:focus {
    color: var(--white) !important;
}

.form-control::placeholder {
    color: var(--text-secondary) !important;
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* Alerts */
.alert {
    border-radius: var(--border-radius);
    border: none;
    font-weight: 500;
    padding: 16px 20px;
    margin-bottom: 20px;
    animation: slideInDown 0.5s ease-out;
}

.alert-success {
    background-color: #34C759;
    color: var(--white);
}

.alert-warning {
    background-color: #FF9500;
    color: var(--white);
}

.alert-danger {
    background-color: #FF3B30;
    color: var(--white);
}

.alert-info {
    background-color: var(--accent-grey);
    color: var(--white);
}

/* Progress bars */
.progress {
    border-radius: var(--border-radius);
    height: 8px;
    background-color: var(--secondary-grey);
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--accent-grey), var(--light-grey));
    border-radius: var(--border-radius);
    transition: width 0.6s ease;
}

/* Loading spinner */
.spinner-border {
    color: var(--accent-grey);
}

/* Dashboard stats */
.stat-card {
    background: linear-gradient(135deg, var(--primary-grey), var(--secondary-grey));
    color: var(--white);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border-grey);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-grey), var(--light-grey));
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), var(--neon-glow);
}

.stat-card:hover::after {
    opacity: 1;
    animation: neonSweep 3s ease-in-out infinite;
}

@keyframes neonSweep {
    0% {
        transform: translateX(-100%) translateY(-100%);
    }
    50% {
        transform: translateX(100%) translateY(100%);
    }
    100% {
        transform: translateX(-100%) translateY(-100%);
    }
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--white);
}

.stat-card p {
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0;
}

/* File upload area */
.upload-area {
    border: 3px dashed var(--border-grey);
    border-radius: var(--border-radius);
    padding: 60px 20px;
    text-align: center;
    transition: var(--transition);
    background-color: var(--primary-grey);
    color: var(--text-primary);
}

.upload-area:hover {
    border-color: var(--accent-grey);
    background-color: var(--secondary-grey);
    transform: scale(1.02);
}

.upload-area.dragover {
    border-color: var(--accent-grey);
    background-color: var(--secondary-grey);
    transform: scale(1.05);
}

/* Tables */
.table {
    background-color: var(--primary-grey);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    color: var(--text-primary);
}

.table thead th {
    background-color: var(--secondary-grey);
    color: var(--white);
    border: none;
    font-weight: 600;
    padding: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: var(--transition);
    border-bottom: 1px solid var(--border-grey);
}

.table tbody tr:hover {
    background-color: var(--secondary-grey);
    transform: scale(1.01);
    box-shadow: var(--neon-glow);
}

.table tbody td {
    padding: 16px;
    color: var(--white);
    border: none;
}

/* Ensure all table text is white */
.table, .table th, .table td {
    color: var(--white) !important;
}

/* Fix for table text visibility in admin panel */
.table thead th {
    background-color: var(--secondary-grey) !important;
    color: var(--white) !important;
    font-weight: 600 !important;
}

.table tbody td {
    background-color: var(--primary-grey) !important;
    color: var(--white) !important;
    border-color: var(--border-grey) !important;
}

/* Ensure badges are visible */
.badge {
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    padding: 0.375rem 0.75rem !important;
}

.badge.bg-success {
    background-color: #28a745 !important;
    color: var(--white) !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
    color: var(--white) !important;
}

.badge.bg-primary {
    background-color: #007bff !important;
    color: var(--white) !important;
}

/* Force table row visibility */
.table tbody tr {
    background-color: var(--primary-grey) !important;
}

.table tbody tr:nth-child(even) {
    background-color: var(--secondary-grey) !important;
}

.table tbody tr:hover {
    background-color: var(--accent-grey) !important;
}

/* Ensure all text in admin panel is visible */
.card-body, .card-header {
    color: var(--white) !important;
}

/* Force table cell text to be white */
.table td, .table th {
    color: var(--white) !important;
    border-color: var(--border-grey) !important;
}

/* Badges */
.badge {
    border-radius: 20px;
    font-weight: 600;
    padding: 6px 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background-color: #34C759;
    color: var(--white);
}

.badge-warning {
    background-color: #FF9500;
    color: var(--white);
}

.badge-danger {
    background-color: #FF3B30;
    color: var(--white);
}

.badge-info {
    background-color: var(--accent-grey);
    color: var(--white);
}

/* Modal */
.modal-content {
    background-color: var(--primary-grey);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-grey);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
    background-color: var(--secondary-grey);
    color: var(--white);
    border-bottom: 1px solid var(--border-grey);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-body {
    color: var(--white);
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid var(--border-grey);
    padding: 20px;
}

/* Ensure all modal text is white */
.modal-content, .modal-header, .modal-body, .modal-footer {
    color: var(--white) !important;
}

/* Footer */
footer {
    background-color: var(--primary-grey);
    color: var(--text-secondary);
    margin-top: auto;
    border-top: 1px solid var(--border-grey);
    padding: 40px 0;
}

footer h5 {
    color: var(--white);
    font-weight: 600;
}

/* Ensure all footer text is visible */
footer, footer p, footer h5 {
    color: var(--white) !important;
}

/* Main content */
main {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

.container {
    animation: fadeInUp 0.8s ease-out;
}

/* Global text color fixes */
h1, h2, h3, h4, h5, h6, p, span, div, label, small, strong, em, b, i {
    color: var(--white) !important;
}

/* Ensure all text in cards is white */
.card, .card-body, .card-header, .card-title, .card-text {
    color: var(--white) !important;
}

/* Ensure all text in alerts is visible */
.alert {
    color: var(--white) !important;
}

/* Ensure all text in buttons is visible */
.btn {
    color: var(--white) !important;
}

/* Ensure all text in dropdowns is visible */
.dropdown-menu, .dropdown-item {
    color: var(--white) !important;
}

.dropdown-item:hover {
    color: var(--black) !important;
}

/* Fix for select elements */
select, select option {
    background-color: var(--secondary-grey) !important;
    color: var(--white) !important;
    border: 2px solid var(--border-grey) !important;
}

select:focus {
    border-color: var(--accent-grey) !important;
    box-shadow: 0 0 0 3px rgba(72, 72, 74, 0.2), var(--neon-glow) !important;
}

/* Fix for all form elements */
input, textarea, select, option {
    color: var(--white) !important;
    background-color: var(--secondary-grey) !important;
}

/* Fix for table text */
.table, .table th, .table td, .table thead th, .table tbody td {
    color: var(--white) !important;
}

/* Fix for modal text */
.modal-content, .modal-header, .modal-body, .modal-footer, .modal-title {
    color: var(--white) !important;
}

/* Fix for navbar text */
.navbar, .navbar-brand, .nav-link, .navbar-nav {
    color: var(--white) !important;
}

/* Fix for footer text */
footer, footer p, footer h5, footer div {
    color: var(--white) !important;
}

/* Fix for any remaining dark text */
* {
    color: var(--white) !important;
}

/* Fix for text-muted class */
.text-muted {
    color: var(--text-secondary) !important;
}

/* Fix for small text */
small {
    color: var(--text-secondary) !important;
}

/* Exception for buttons that should have dark text on hover */
.btn:hover {
    color: var(--black) !important;
}

.dropdown-item:hover {
    color: var(--black) !important;
}

/* Fix for specific text elements */
p.text-muted, .text-muted {
    color: var(--text-secondary) !important;
}

/* Ensure all text in upload page is visible */
.card-body p, .card-body h6, .card-body small {
    color: var(--white) !important;
}

.card-body .text-muted {
    color: var(--text-secondary) !important;
}

/* Specific fixes for upload page */
.upload-area p, .upload-area h5, .upload-area small {
    color: var(--white) !important;
}

.upload-area .text-muted {
    color: var(--text-secondary) !important;
}

/* Fix for "How it works" section */
.card-body .col-md-4 p, .card-body .col-md-4 h6 {
    color: var(--white) !important;
}

.card-body .col-md-4 .text-muted {
    color: var(--text-secondary) !important;
}

/* Override Bootstrap's text-muted for our dark theme */
.text-muted {
    color: var(--text-secondary) !important;
}

/* Ensure all paragraphs are visible */
p {
    color: var(--white) !important;
}

p.text-muted {
    color: var(--text-secondary) !important;
}

/* Dropdown */
.dropdown-menu {
    background-color: var(--primary-grey);
    border: 1px solid var(--border-grey);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.dropdown-item {
    color: var(--text-primary);
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: var(--secondary-grey);
    color: var(--white);
}

/* Responsive design */
@media (max-width: 768px) {
    .card {
        margin-bottom: 20px;
    }
    
    .stat-card h3 {
        font-size: 2rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .navbar-nav {
        margin-top: 10px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

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

.pulse {
    animation: pulse 2s infinite;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--accent-grey);
    border-radius: 4px;
}

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

/* Selection */
::selection {
    background-color: var(--accent-grey);
    color: var(--white);
}

/* Focus styles */
*:focus {
    outline: 2px solid var(--accent-grey);
    outline-offset: 2px;
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--accent-grey);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Balance display in navigation */
.balance-text {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--white);
    background: linear-gradient(45deg, var(--accent-grey), var(--light-grey));
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-grey);
    transition: var(--transition);
}

.balance-text:hover {
    transform: scale(1.05);
    box-shadow: var(--neon-glow);
}

.nav-item .nav-link .balance-text {
    margin-left: 4px;
}

/* Enhanced logo styling */
.navbar-brand {
    position: relative;
    font-family: 'Orbitron', 'Courier New', monospace;
    font-weight: 900;
    font-size: 1.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: var(--transition);
    animation: logoNeon 4s ease-in-out infinite;
}

.navbar-brand::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    border-radius: 4px;
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.navbar-brand:hover {
    transform: scale(1.1);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 30px rgba(255, 255, 255, 0.4);
}

.navbar-brand:hover::before {
    opacity: 1;
    animation: logoGlow 2s ease-in-out infinite;
}

@keyframes logoNeon {
    0%, 100% {
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    }
    50% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 35px rgba(255, 255, 255, 0.5);
    }
}

@keyframes logoGlow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Enhanced floating particles effect - only for landing page */
body.landing-page::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.15) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 10% 60%, rgba(72, 72, 74, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 90% 40%, rgba(72, 72, 74, 0.08) 1px, transparent 1px);
    background-size: 60px 60px, 40px 40px, 25px 25px, 35px 35px, 45px 45px;
    animation: particleFloat 12s linear infinite;
    z-index: -1;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-50px) rotate(180deg);
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
    }
}

/* Section glow effect */
.card, .stat-card {
    position: relative;
}

.card::after, .stat-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    border-radius: var(--border-radius);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.card:hover::after, .stat-card:hover::after {
    opacity: 1;
    animation: sectionGlow 3s ease-in-out infinite;
}

@keyframes sectionGlow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
} 