/* Dashboard.css - Professional Dashboard Styles */

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --light-bg: #f9fafb;
    --dark-bg: #111827;
    --light-card: #ffffff;
    --dark-card: #1f2937;
    --light-text: #111827;
    --dark-text: #f9fafb;
    --border-color: #e5e7eb;
    --dark-border-color: #374151;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

/* Base Styles */
body {
    font-family: 'Instrument Sans', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--light-bg);
    color: var(--light-text);
    transition: var(--transition);
}

body.dark-mode {
    background-color: var(--dark-bg);
    color: var(--dark-text);
}

.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--light-card);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
    flex-wrap: nowrap;
}

body.dark-mode .header-container {
    background-color: var(--dark-card);
    border-bottom: 1px solid var(--dark-border-color);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-left {
    justify-content: flex-start;
}

.nav-right {
    justify-content: flex-end;
}

.nav-button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    background-color: transparent;
    color: var(--secondary-color);
}

.nav-button:hover {
    color: var(--primary-color);
}

.nav-button.primary {
    background-color: var(--primary-color);
    color: white;
}

.nav-button.primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Theme Toggle Button in Header */
.theme-toggle-header {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: transparent;
    color: var(--secondary-color);
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition);
    margin-left: 0.75rem;
    position: relative;
    overflow: hidden;
}

body.dark-mode .theme-toggle-header {
    color: #e5e7eb;
    border-color: var(--dark-border-color);
}

.theme-toggle-header:hover {
    transform: rotate(15deg);
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
}

.theme-toggle-header::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(45deg, transparent, rgba(79, 70, 229, 0.3), transparent);
    z-index: -1;
    animation: shimmer 2s linear infinite;
}

/* Hero Section */
.hero-title {
    font-size: 3rem;
    font-weight: 900;
    background: url('../images/sea.jpg') repeat-x center;
    background-size: 1000px auto;
    /* Controls image stretch */
    -webkit-background-clip: text;
    color: transparent;
    animation: animate 10s linear infinite;
    text-transform: uppercase;
    letter-spacing: 10px;
}

@keyframes animate {
    0% {
        background-position-x: 0;
    }

    100% {
        background-position-x: -1000px;
    }
}

.hero-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}


.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.75;
    margin-bottom: 2.5rem;
    color: var(--secondary-color);
}

body.dark-mode .hero-subtitle {
    color: #9ca3af;
}

.email-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.email-link:hover {
    text-decoration: underline;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.button.primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.button.primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

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

.button.secondary:hover {
    background-color: rgba(79, 70, 229, 0.1);
    transform: translateY(-2px);
}

/* Theme Toggle Button (Legacy - Hidden) */
.theme-toggle {
    display: none;
}

.shimmer-border {
    position: relative;
    overflow: hidden;
}

.shimmer-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(45deg, transparent, rgba(79, 70, 229, 0.3), transparent);
    z-index: -1;
    animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    transition: var(--transition);
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.login-modal,
.terms-modal {
    background-color: var(--light-card);
    border-radius: 0.75rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transform: translateY(20px);
    animation: slideUp 0.3s ease-out forwards;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

body.dark-mode .login-modal,
body.dark-mode .terms-modal {
    background-color: var(--dark-card);
}

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

body.dark-mode .modal-header {
    border-bottom-color: var(--dark-border-color);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--light-text);
    margin: 0;
}

body.dark-mode .modal-title {
    color: var(--dark-text);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--secondary-color);
    transition: var(--transition);
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    background-color: rgba(107, 114, 128, 0.1);
    color: var(--danger-color);
}

.modal-body {
    padding: 1.5rem;
}

/* Form Styles */
.login-form .form-group {
    margin-bottom: 1.25rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--light-text);
}

body.dark-mode .login-form label {
    color: #e5e7eb;
}

.login-form input[type="email"],
.login-form input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--light-card);
    color: var(--light-text);
}

body.dark-mode .login-form input[type="email"],
body.dark-mode .login-form input[type="password"] {
    background-color: #374151;
    border-color: #4b5563;
    color: var(--dark-text);
}

.login-form input[type="email"]:focus,
.login-form input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.login-form .checkbox {
    display: flex;
    align-items: center;
}

.login-form .checkbox input {
    margin-right: 0.5rem;
    cursor: pointer;
}

.login-form .checkbox label {
    margin-bottom: 0;
    cursor: pointer;
}

.forgot-password {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    text-align: right;
}

.forgot-password a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.forgot-password a:hover {
    text-decoration: underline;
}

.submit-button {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.submit-button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.submit-button:disabled {
    background-color: #a5b4fc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Terms of Service Styles */
.terms-content {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.tos-last-updated {
    color: var(--secondary-color);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.tos-section {
    margin-bottom: 1.5rem;
}

.tos-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--light-text);
}

body.dark-mode .tos-section h4 {
    color: var(--dark-text);
}

.tos-section p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.tos-section ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.tos-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.tos-acceptance {
    margin-top: 2rem;
    padding: 1rem;
    background-color: rgba(79, 70, 229, 0.1);
    border-radius: 0.375rem;
    border-left: 4px solid var(--primary-color);
}

body.dark-mode .tos-acceptance {
    background-color: rgba(79, 70, 229, 0.2);
}

.terms-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

body.dark-mode .terms-actions {
    border-top-color: var(--dark-border-color);
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    max-width: 400px;
    width: calc(100% - 40px);
}

.flash-message {
    margin-bottom: 10px;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    animation: slideIn 0.3s ease-out forwards;
    word-break: break-word;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.flash-message.success {
    background-color: #ecfdf5;
    border-left: 4px solid var(--success-color);
    color: #065f46;
}

.flash-message.error {
    background-color: #fef2f2;
    border-left: 4px solid var(--danger-color);
    color: #b91c1c;
}

.flash-message.info {
    background-color: #eff6ff;
    border-left: 4px solid var(--info-color);
    color: #1e40af;
}

body.dark-mode .flash-message.success {
    background-color: #064e3b;
    color: #d1fae5;
}

body.dark-mode .flash-message.error {
    background-color: #7f1d1d;
    color: #fee2e2;
}

body.dark-mode .flash-message.info {
    background-color: #1e3a8a;
    color: #dbeafe;
}

.flash-message i {
    margin-right: 10px;
    font-size: 1.25rem;
}

.close-flash {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.close-flash:hover {
    opacity: 1;
}

/* Status Indicator */
#status-indicator {
    padding: 1rem;
    border-radius: 0.375rem;
    margin: 1rem 0;
    text-align: center;
}

/* Notification Banner */
#notification-banner {
    position: fixed;
    top: 1rem;
    right: 1rem;
    max-width: 24rem;
    width: calc(100% - 2rem);
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    word-break: break-word;
}

/* Login Button Animation */
.super-login-btn {
    position: relative;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), #818cf8);
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.4);
}

.super-login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px -3px rgba(79, 70, 229, 0.5);
}

.super-login-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: all 0.6s ease;
    z-index: -1;
}

.super-login-btn:hover::before {
    left: 100%;
}

.super-login-btn i {
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
}

.super-login-btn:hover i {
    transform: translateX(3px);
}

/* Footer Styles */
.footer {
    background-color: var(--light-card);
    color: var(--secondary-color);
    padding: 3rem 2rem 1rem;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    transition: var(--transition);
}

body.dark-mode .footer {
    background-color: var(--dark-card);
    border-top-color: var(--dark-border-color);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h4 {
    color: var(--light-text);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
}

body.dark-mode .footer-section h4 {
    color: var(--dark-text);
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-section p {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.footer-section a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    text-decoration: underline;
}

.footer-section i {
    width: 20px;
    text-align: center;
    margin-right: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
}

body.dark-mode .footer-bottom {
    border-top-color: var(--dark-border-color);
}

/* Nav Links */
.nav-link {
    color: var(--secondary-color);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(79, 70, 229, 0.1);
}

body.dark-mode .nav-link:hover {
    background-color: rgba(79, 70, 229, 0.2);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .header-container {
        padding: 0.75rem;
        flex-wrap: wrap;
    }

    .nav-links {
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }

    .logo {
        height: 40px;
    }

    .hero-section {
        padding: 2rem 1rem;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .nav-button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .super-login-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .theme-toggle-header {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1rem;
        margin-left: 0.5rem;
    }

    .login-modal,
    .terms-modal {
        width: 95%;
        max-width: 450px;
    }

    .footer {
        padding: 2rem 1rem 1rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    .footer-section {
        min-width: 100%;
    }

    .flash-messages {
        max-width: 90%;
        right: 5%;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0.5rem;
        justify-content: center;
        gap: 0.5rem;
    }

    .nav-links {
        order: 2;
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }

    .logo-container {
        order: 1;
    }

    .nav-right {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .action-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .button {
        width: 100%;
    }

    .terms-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .terms-actions button {
        width: 100%;
    }

    .theme-toggle {
        display: none;
        /* Hide the old theme toggle button */
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-title {
        font-size: 1.1rem;
    }

    .footer-section h4 {
        font-size: 1.1rem;
    }
}

/* Small phone screens */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.85rem;
    }

    .super-login-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .theme-toggle-header {
        width: 2rem;
        height: 2rem;
        font-size: 0.85rem;
        margin-left: 0.3rem;
    }

    .button {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

/* Custom Scrollbar */
.terms-content::-webkit-scrollbar {
    width: 8px;
}

.terms-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.terms-content::-webkit-scrollbar-thumb {
    background: #c5c5c5;
    border-radius: 10px;
}

.terms-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

body.dark-mode .terms-content::-webkit-scrollbar-track {
    background: #2d3748;
}

body.dark-mode .terms-content::-webkit-scrollbar-thumb {
    background: #4a5568;
}

body.dark-mode .terms-content::-webkit-scrollbar-thumb:hover {
    background: #718096;
}