﻿/* Global Theme Variables */
:root[data-theme="dark"] {
    --background: #1A1C22;
    --secondary-background: #2A2D35;
    --darkened-secondary-background: #21242A;
    --text: #E8ECEF;
    --accent: #D4A017;
    --alternate-accent: #2E7D32;
    --opposite-accent: #4DD0E1;
    --darkened-opposite-accent: #26A7B8;
    --slider-track: #555;
}

:root[data-theme="light"] {
    --background: #F5F0E1;
    --secondary-background: #FAEBD7;
    --darkened-secondary-background: #E8DCCA;
    --text: #0A1C2B;
    --accent: #5D8C88;
    --alternate-accent: #0D47A1;
    --opposite-accent: #D4A017;
    --darkened-opposite-accent: #A67B12;
    --darkened-accent: #49706D;
    --slider-track: #D9C8A8;
}

:root[data-theme="midnight"] {
    --background: #0B1C2C;
    --secondary-background: #132A3C;
    --darkened-secondary-background: #0A1A28;
    --text: #E6F1F5;
    --accent: #CFA235;
    --alternate-accent: #2B5D88;
    --opposite-accent: #FFB74D;
    --darkened-opposite-accent: #E69525;
    --slider-track: #334757;
}

:root[data-theme="forest"] {
    --background: #1D2B22;
    --secondary-background: #2E4032;
    --darkened-secondary-background: #24382C;
    --text: #DCEAD8;
    --accent: #77B255;
    --alternate-accent: #4A7C59;
    --opposite-accent: #B5DE99;
    --darkened-opposite-accent: #89C075;
    --slider-track: #3B5945;
}

:root[data-theme="woodland"] {
    --background: #ECE1D1;
    --secondary-background: #D8C6B4;
    --darkened-secondary-background: #C3AF9D;
    --text: #2B1C10;
    --accent: #7E674A;
    --alternate-accent: #A67C52;
    --opposite-accent: #4E8B6E;
    --darkened-opposite-accent: #397A5A;
    --slider-track: #BDAA96;
}

:root[data-theme="cloud"] {
    --background: #F4F7F9;
    --secondary-background: #E1E6EA;
    --darkened-secondary-background: #CDD4D9;
    --text: #1A1F23;
    --accent: #4091C9;
    --alternate-accent: #5DADE2;
    --opposite-accent: #2C3E50;
    --darkened-opposite-accent: #1C2E40;
    --slider-track: #BAC6D1;
}

:root[data-theme="ice"] {
    --background: #EAF4F8;
    --secondary-background: #D3E8EE;
    --darkened-secondary-background: #BBD8E0;
    --text: #0C1C2D;
    --accent: #4EB1BA;
    --alternate-accent: #2F8190;
    --opposite-accent: #0B6E99;
    --darkened-opposite-accent: #085578;
    --slider-track: #C2D9DE;
}

:root[data-theme="ocean"] {
    --background: #002B36;
    --secondary-background: #073642;
    --darkened-secondary-background: #01232D;
    --text: #E0F7FA;
    --accent: #26A69A;
    --alternate-accent: #00ACC1;
    --opposite-accent: #4DD0E1;
    --darkened-opposite-accent: #26C6DA;
    --slider-track: #1E4E50;
}

:root[data-theme="neon"] {
    --background: #000C1F;
    --secondary-background: #001B3C;
    --darkened-secondary-background: #00122B;
    --text: #FFFFFF;
    --accent: #00FFD5;
    --alternate-accent: #00BFA6;
    --opposite-accent: #FF00C8;
    --darkened-opposite-accent: #D600A8;
    --slider-track: #00FFD5;
}

:root[data-theme="sepia"] {
    --background: #F4ECD8;
    --secondary-background: #E5D6B8;
    --darkened-secondary-background: #D4C3A2;
    --text: #3E2E1C;
    --accent: #AD8145;
    --alternate-accent: #D4A017;
    --opposite-accent: #7C5535;
    --darkened-opposite-accent: #5A3F27;
    --slider-track: #CBB89E;
}

:root[data-theme="crimson"] {
    --background: #2B0D0D;
    --secondary-background: #441313;
    --darkened-secondary-background: #370F0F;
    --text: #FFEAEA;
    --accent: #C62828;
    --alternate-accent: #E53935;
    --opposite-accent: #FF8A65;
    --darkened-opposite-accent: #D66B4A;
    --slider-track: #663333;
}

:root[data-theme="slate"] {
    --background: #2F2F33;
    --secondary-background: #3B3B40;
    --darkened-secondary-background: #27272B;
    --text: #E0E0E0;
    --accent: #9E9E9E;
    --alternate-accent: #757575;
    --opposite-accent: #BDBDBD;
    --darkened-opposite-accent: #8D8D8D;
    --slider-track: #5C5C5C;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: var(--background);
    color: var(--text);
    transition: background-color 0.3s, color 0.3s;
}

.page-title {
    position: fixed;
    top: 118px;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--accent);
    font-size: 32px; /* Match old h1 */
    margin: 0;
    z-index: 1000;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px; /* Match old setup */
    transition: margin-left 0.3s ease;
}

    .container.shifted {
        margin-left: 256px !important;
        transition: transform 0.3s ease; 
    }

.menu-button {
    position: fixed;
    top: 20px;
    left: 20px;
    background-color: var(--secondary-background);
    color: var(--text);
    border: 1px solid var(--accent);
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s, color 0.3s;
    z-index: 2000;
}

    .menu-button:hover {
        background-color: var(--accent);
    }

    .menu-button .bar {
        width: 20px;
        height: 2px;
        background-color: var(--text);
        margin: 2px 0;
    }

.flash-messages {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: 90%;
  max-width: 500px;
}

.flash-message {
  background-color: #323232;
  color: white;
  padding: 10px 20px;
  margin-bottom: 8px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  font-weight: 500;
  text-align: center;
}



/* ------------------------------------
 * 5. Utility Buttons (Top Right)
 * ------------------------------------ */
.top-right-button-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 999;
}

.top-right-button {
    background-color: var(--secondary-background);
    color: white;
    border: 1px solid var(--accent);
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
}

.top-right-button:hover {
    background-color: var(--accent);
}


/* ------------------------------------
 * 2. Modal Overlay and Container
 * ------------------------------------ */

.modal-overlay {
    position: fixed; /* Fixed position */
    inset: 0; /* Top, right, bottom, left = 0 */
    z-index: 9000; /* High Z-index to cover everything */
    display: none; /* Default hidden state */
    align-items: center; /* Center content vertically */
    justify-content: center; /* Center content horizontally */
    background-color: rgba(0, 0, 0, 0.5);
    transition: opacity 300ms ease; 
}
.modal-overlay.open {
    display: flex; /* Show the overlay when the 'open' class is added by JS */
}

.modal-content {
    background-color: var(--secondary-background);
    padding: 8px; 
    border-radius: 5px; /* Rounded corners */
    border: 1px solid var(--accent);
    /* Responsive sizing based on request: 1/3 max width, clamped at 500px, but responsive */
    width: 90%; 
    max-width: min(500px, 33.333vw); 

    /* Animation initial state */
    transform: scale(0.95); 
    opacity: 0; 
    transition: transform 300ms ease, opacity 300ms ease; 
    color: var(--text);
    margin: 20px; /* Ensures space on small screens */
}

/* Make it full width on smaller screens */
@media (max-width: 1024px) {
    .modal-content {
        max-width: 90vw; 
    }
}

/* Animation final state (triggered by data-state='open') */
.modal-content[data-state='open'] {
    transform: scale(1);
    opacity: 1; 
}


/* ------------------------------------
 * 3. Modal Header
 * ------------------------------------ */

.modal-header {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding-bottom: 8px; 
    border-bottom: 1px solid var(--accent); 
}
.modal-title {
    font-size: 1.25rem; 
    font-weight: 700; 
    margin: 0;
}

.modal-close-button {
    color: var(--text); 
    border: none;
    background: none;
    cursor: pointer;
    padding: 5px; 
    line-height: 1;
    transition: color 150ms ease; 
    border-radius: 50%;
}
.modal-close-button:hover {
    color: var(--accent); 
    background-color: rgba(var(--accent), 0.1);
}
/* SVG Size for the 'X' icon */
.modal-close-button svg {
    height: 1.5rem; 
    width: 1.5rem; 
    stroke: currentColor;
}


/* ------------------------------------
 * 4. Modal Body and Form Elements
 * ------------------------------------ */

.modal-body {
    padding-top: 8px; 
    padding-bottom: 2px; 
    display: flex;
    flex-direction: column;
    gap: 2px; 
}
.modal-label {
    display: block; 
    font-size: 0.875rem; 
    font-weight: 500; 
    color: var(--text); 
    margin-bottom: 0.25rem; 
}

.modal-input {
    width: 100%; 
    padding: 0.5rem 0.75rem; 
    border: 1px solid var(--accent);
    border-radius: 0.5rem; 
    background-color: var(--secondary-background);
    color: var(--text);
    box-sizing: border-box;
    transition: border-color 150ms ease, box-shadow 150ms ease;
    resize: vertical; /* Allow textarea to be resized vertically */
}

textarea.modal-input {
    min-height: 12rem; /* Approximate height for 8 lines of text */
}

.modal-input:focus {
    outline: none;
    border-color: var(--accent); 
}
/* Style the select dropdown */
select.modal-input {
    appearance: none; 
    padding-right: 8px;

    background-color: var(--secondary-background);
    color: var(--text);
    border: 1px solid var(--accent);
    border-radius: 5px;
    
    /* 4. Ensure it fills the container and has standard padding */
    width: 100%;
    padding: 0.5rem 1rem;
    line-height: 1.25;
}


/* ------------------------------------
 * 5. Modal Footer and Submit Button
 * ------------------------------------ */

.modal-footer {
    padding-top: 4px; 
    border-top: 1px solid var(--accent);
    display: flex; 
    justify-content: flex-end; 
}
.modal-submit-button {
    padding: 8px; 
    background-color: var(--secondary-background);
    color: white;
    font-weight: 600; 
    border-radius: 0.5rem; 
    border: 1px solid var(--accent);
    cursor: pointer;
    transition: opacity 150ms ease; 
}
.modal-submit-button:hover {
    background-color: var(--accent);
}
.modal-submit-button:disabled {
    background-color: #9ca3af; 
    cursor: not-allowed;
}

.submission-status {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.9em;
    min-height: 20px; /* Prevents layout shift */
}

/* Sidebar Styles */
div.sidebar {
    position: fixed !important;
    top: 0 !important;
    left: -250px !important;
    width: 250px !important;
    height: 100% !important;
    background-color: var(--secondary-background) !important;
    border-right: 1px solid var(--accent) !important;
    transition: none; /* Prevent load-time transition */
    z-index: 1000 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

    div.sidebar.open {
        left: 0 !important;
    }

/* Hide Sidebar on Landing and Login Pages */
:root[data-page="landing"] div.sidebar,
:root[data-page="login"] div.sidebar,
:root[data-page="signup"] div.sidebar {
    display: none !important;
}

.sidebar-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100%;
}

.sidebar-button {
    width: 80%;
    background-color: var(--secondary-background);
    color: var(--text);
    border: 1px solid var(--accent);
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    text-align: center;
    transition: background-color 0.3s, color 0.3s;
}

    .sidebar-button:hover {
        background-color: var(--accent);
        color: var(--background);
    }

.theme-toggle {
    position: fixed;
    top: 20px;
    left: 80px;
    background-color: var(--accent);
    color: var(--background);
    border: 2px solid var(--accent);
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: border-color 0.3s, background-color 0.3s, color 0.3s, transform 0.3s ease;
}

.theme-toggle.shifted {
    left: 276px !important;
    transition: none;
}


/* Dashboard Styles */
.alerts-container-fixed {
    position: absolute;
    top: 60px;
    right: 20px;
    width: 30%;
    padding: 20px;
}

.alerts-box {
    width: 100%;
    height: 80vh;
    border: 1px solid var(--accent);
    border-radius: 5px;
    background-color: var(--secondary-background);
    overflow-y: scroll;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.alert-header {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent);
    position: sticky;
    top: 0;
    background-color: var(--secondary-background);
    z-index: 1;
    padding: 10px 0;
    margin: 0;
}

.alerts-container {
    margin-top: 10px;
}

.alert-item {
    background-color: var(--background);
    border-bottom: 1px solid var(--alternate-accent);
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 3px;
}

    .alert-item:nth-child(even) {
        background-color: var(--secondary-background);
    }

.balance-display {
    position: fixed;
    top: 90px;
    left: 20px;
    color: var(--text);
    font-size: 24px;
    background-color: var(--secondary-background);
    padding: 12px 20px;
    width: 300px;
    border: 1px solid var(--accent);
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

    .balance-display.shifted, .buy-percentage-box.shifted, .sell-percentage-box.shifted, .status-container.shifted, .buy-amount-box.shifted, .fixed-amount-box.shifted, .sell-amount-box.shifted, .save-settings-button.shifted {
        margin-left: 256px !important;
    }

    .balance-display .in-stock {
        font-size: 12px;
        color: var(--alternate-accent);
        margin-left: 8px;
    }

.save-settings-button {
    position: fixed;
    top: 150px; /* 170px (buy-percentage-box) - 40px to fit above */
    left: 20px;
    width: 300px;
    height: 22px; /* Thin height */
    background-color: var(--secondary-background);
    color: var(--text);
    font-size: 16px;
    border: 1px solid var(--accent);
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease; /* Match other boxes */
}

.save-settings-button:hover {
    background-color: var(--accent);
    color: var(--background);
}

.save-settings-button.saving {
    background-color: var(--accent);
    color: var(--background);
    cursor: not-allowed;
}

.percentage-box {
    position: fixed;
    left: 20px;
    width: 300px;
    background-color: var(--secondary-background);
    padding: 12px 20px;
    border: 1px solid var(--accent);
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: var(--text);
    font-size: 16px;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.buy-percentage-box {
    top: 175px;
}

.sell-percentage-box {
    top: 255px;
}
.amount-box {
    position: fixed;
    left: 20px;
    width: 300px;
    background-color: var(--secondary-background);
    padding: 12px 20px;
    border: 1px solid var(--accent);
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: var(--text);
    font-size: 16px;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.fixed-amount-box { top: 338px;}
.buy-amount-box   { top: 405px;}
.sell-amount-box  { top: 560px;}

/* inner layout */
.option-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.option-row input[type="number"] {
    margin-left: 10px;
    flex: 1;
}

.option-row input[type="checkbox"],
.option-row input[type="radio"] {
    margin-right: 10px;
}

.subtitle {
    font-weight: bold;
    margin-top: 5px;
    margin-bottom: 5px;
}

.subtitle-divider {
    border: none;
    border-top: 1px solid var(--accent);
    margin: 5px 0 10px 0;
}

.option-group {
    margin-left: 5px;
}

.status-container {
    position: fixed;
    bottom: 60px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: transform 0.3s ease;
}

.status-box {
    font-size: 14px;
    background-color: var(--secondary-background);
    padding: 5px 10px;
    border: 1px solid var(--accent);
    border-radius: 3px;
    line-height: 20px;
    width: 300px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

    .status-box.error {
        background-color: #B71C1C;
        color: #FFFFFF;
    }

.webhook-container {
    position: fixed;
    top: 450px; /* You will need to adjust this value to place it correctly below the other boxes */
    left: 50%;
    transform: translateX(-50%);
    
    /* ADD THESE TWO LINES TO MAKE IT THE SAME WIDTH */
    width: 80vw;
    max-width: 1200px;
    
    background-color: var(--secondary-background, #2a2a2a); /* Add this to make it a solid box */
    border: 1px solid var(--accent, #ffcc00); /* Add this to give it a border */
    border-radius: 5px; /* Add this for rounded corners */
    padding: 20px; /* Add this for internal spacing */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add this for a shadow */
    
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}
    .webhook-container.shifted {
        margin-left: 150px !important;
    }

/* This is the flex container that holds the label, input, and button */
.webhook-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    border: 1px solid var(--accent);
    border-radius: 3px;
    overflow: hidden;
}

.webhook-url-label {
    /* Your existing styles for the label */
    color: var(--text);
    font-size: 14px;
    background-color: var(--secondary-background);
    padding: 5px 10px;
    border-radius: 3px 0 0 3px;
    line-height: 20px;
    white-space: nowrap; /* Prevents wrapping */
    flex-shrink: 0; /* Prevents it from shrinking on smaller screens */
}

/* The input field is now a direct flex item */
#webhookInput {
    /* Make the input field grow and take up all available space */
    flex-grow: 1; 
    
    color: var(--text);
    background-color: var(--secondary-background);
    border: none;
    padding: 5px 10px;
    font-size: 14px;
    line-height: 20px;
    /* Remove any border-radius since the wrapper handles it */
    -webkit-appearance: none; /* Removes default input styling */
    -moz-appearance: textfield;
}

/* Base styles for all buttons inside the wrapper */
.copy-button,
.regenerate-button {
    color: var(--text);
    background-color: var(--secondary-background);
    border: none; /* No border for the buttons themselves, the wrapper handles it */
    padding: 5px 10px;
    font-size: 14px;
    cursor: pointer;
    line-height: 20px;
    flex-shrink: 0;
}

/* Styles specific to the Copy button */
.copy-button {
    /* A left border to separate it from the input field */
    border-left: 1px solid var(--accent);
}

/* Styles specific to the Regenerate button */
.regenerate-button {
    /* A left border to separate it from the copy button */
    border-left: 1px solid var(--accent);
    /* Make the right side have the border radius of the wrapper */
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
}

/* Adjust the copy button to remove its right border radius if it has one */
.copy-button {
    /* Ensures the copy button has straight corners on its right side to join with the regenerate button */
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Optional: Add hover effect for a better user experience */
.copy-button:hover,
.regenerate-button:hover {
    background-color: var(--accent);
    color: var(--primary-background); /* assuming your primary background is dark */
}

/* Hide scrollbar for WebKit browsers (Chrome, Safari) */
.webhook-url::-webkit-scrollbar {
    display: none;
}


/* Settings Page Styles */
.settings-box {
    position: absolute;
    top: 118px; /* Match sidebar-box */
    width: 53.33vw;
    background-color: var(--secondary-background);
    border: 1px solid var(--accent);
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    min-height: 180px;
    transform: translateX(-243px); /* Match old centering */
}

.sidebar-box {
    position: absolute;
    left: calc(53.33vw + 440px);
    top: 118px;
    width: 300px;
    min-height: 300px;
    background-color: var(--secondary-background);
    border: 1px solid var(--accent);
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transition: left 0.3s ease;
}

.container.shifted .sidebar-box {
    left: calc(53.33vw + 338px);
}

.filler-box {
    position: absolute;
    left: calc(53.33vw + 440px);
    top: 425px;
    width: 300px;
    min-height: 100px;
    background-color: var(--secondary-background);
    border: 1px solid var(--accent);
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transition: left 0.3s ease;
}

.container.shifted .filler-box {
    left: calc(53.33vw + 338px);
}

.filler-box a {
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
}

    .filler-box a:hover {
        text-decoration: underline;
    }

.theme-box {
    position: absolute;
    top: 650px; /* Below settings-box, matching filler-box */
    left: 300px;
    width: calc(53.33vw + 137.600px);
    background-color: var(--secondary-background);
    border: 1px solid var(--accent);
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    min-height: 100px;
}

.title-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.box-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent);
    text-align: center;
    flex: 1;
}

.quick-swap-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 5px;
}

.quick-swap-button {
    width: 26px;
    height: 26px;
    border: 2px solid var(--accent);
    background-color: var(--secondary-background);
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .quick-swap-button.filled {
        background-color: var(--accent);
    }

        .quick-swap-button.filled::after {
            content: '✓';
            color: #FFFFFF;
            font-size: 16px;
            font-weight: bold;
        }

.title-divider {
    border: 2px solid var(--accent);
    margin: 10px 0;
}

.content-row {
    display: flex;
    flex: 1;
    align-items: stretch;
}

.section {
    flex: 1;
    padding: 0 20px;
    display: flex;
    align-items: stretch;
}

.divider {
    width: 2px;
    background-color: var(--accent);
    margin: 0 20px;
}

.box-content {
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.subtitle {
    font-size: 16px;
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 2px;
}

.subtitle-divider {
    border: 2px solid var(--accent);
    margin: 2px 0 10px 0;
}

.option-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.theme-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-scroll {
    display: flex;
    overflow-x: auto;
    padding: 10px 0 10px 5px;
    gap: 10px;
}

.theme-square {
    border: 1px solid var(--accent);
    width: 67px;
    height: 72px;
    background-color: #FFFFFF;
    border-radius: 5px;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
}

    .theme-square:nth-child(1) {
        background: linear-gradient(to right, #1A1C22 100%, #1A1C22 0%, transparent 50%, transparent 100%), linear-gradient(to bottom, #D4A017 0%, #D4A017 50%, #E8ECEF 50%, #E8ECEF 100%);
        background-size: 50% 100%, 50% 100%;
        background-position: left, right;
    }

    .theme-square:nth-child(2) {
        background: linear-gradient(to right, #F5F0E1 100%, #F5F0E1 0%, transparent 50%, transparent 100%), linear-gradient(to bottom, #5D8C88 0%, #5D8C88 50%, #0A1C2B 50%, #0A1C2B 100%);
        background-size: 50% 100%, 50% 100%;
        background-position: left, right;
    }

    .theme-square:nth-child(3) {
        background: linear-gradient(to right, #0B1C2C 100%, #0B1C2C 0%, transparent 50%, transparent 100%), linear-gradient(to bottom, #CFA235 0%, #CFA235 50%, #E6F1F5 50%, #E6F1F5 100%);
        background-size: 50% 100%, 50% 100%;
        background-position: left, right;
    }

    .theme-square:nth-child(4) {
        background: linear-gradient(to right, #1D2B22 100%, #1D2B22 0%, transparent 50%, transparent 100%), linear-gradient(to bottom, #77B255 0%, #77B255 50%, #DCEAD8 50%, #DCEAD8 100%);
        background-size: 50% 100%, 50% 100%;
        background-position: left, right;
    }

    .theme-square:nth-child(5) {
        background: linear-gradient(to right, #ECE1D1 100%, #ECE1D1 0%, transparent 50%, transparent 100%), linear-gradient(to bottom, #7E674A 0%, #7E674A 50%, #2B1C10 50%, #2B1C10 100%);
        background-size: 50% 100%, 50% 100%;
        background-position: left, right;
    }

    .theme-square:nth-child(6) {
        background: linear-gradient(to right, #F4F7F9 100%, #F4F7F9 0%, transparent 50%, transparent 100%), linear-gradient(to bottom, #4091C9 0%, #4091C9 50%, #1A1F23 50%, #1A1F23 100%);
        background-size: 50% 100%, 50% 100%;
        background-position: left, right;
    }

    .theme-square:nth-child(7) {
        background: linear-gradient(to right, #000C1F 100%, #000C1F 0%, transparent 50%, transparent 100%), linear-gradient(to bottom, #00FFD5 0%, #00FFD5 50%, #FFFFFF 50%, #FFFFFF 100%);
        background-size: 50% 100%, 50% 100%;
        background-position: left, right;
    }

    .theme-square:nth-child(8) {
        background: linear-gradient(to right, #EAF4F8 100%, #EAF4F8 0%, transparent 50%, transparent 100%), linear-gradient(to bottom, #4EB1BA 0%, #4EB1BA 50%, #0C1C2D 50%, #0C1C2D 100%);
        background-size: 50% 100%, 50% 100%;
        background-position: left, right;
    }

    .theme-square:nth-child(9) {
        background: linear-gradient(to right, #F4ECD8 100%, #F4ECD8 0%, transparent 50%, transparent 100%), linear-gradient(to bottom, #AD8145 0%, #AD8145 50%, #3E2E1C 50%, #3E2E1C 100%);
        background-size: 50% 100%, 50% 100%;
        background-position: left, right;
    }

    .theme-square:nth-child(10) {
        background: linear-gradient(to right, #2B0D0D 100%, #2B0D0D 0%, transparent 50%, transparent 100%), linear-gradient(to bottom, #C62828 0%, #C62828 50%, #FFEAEA 50%, #FFEAEA 100%);
        background-size: 50% 100%, 50% 100%;
        background-position: left, right;
    }

    .theme-square:nth-child(11) {
        background: linear-gradient(to right, #2F2F33 100%, #2F2F33 0%, transparent 50%, transparent 100%), linear-gradient(to bottom, #9E9E9E 0%, #9E9E9E 50%, #E0E0E0 50%, #E0E0E0 100%);
        background-size: 50% 100%, 50% 100%;
        background-position: left, right;
    }

    .theme-square:nth-child(12) {
        background: linear-gradient(to right, #002B36 100%, #002B36 0%, transparent 50%, transparent 100%), linear-gradient(to bottom, #26A69A 0%, #26A69A 50%, #E0F7FA 50%, #E0F7FA 100%);
        background-size: 50% 100%, 50% 100%;
        background-position: left, right;
    }

    .theme-square:hover {
        outline: 2px solid var(--accent);
        outline-offset: 0;
    }

    .theme-square.clicked::after {
        content: '✓';
        position: absolute;
        right: 0px;
        bottom: 0px;
        color: var(--background);
        font-size: 16px;
        font-weight: bold;
        background-color: var(--secondary-background);
        width: 26px;
        height: 26px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 5px;
        animation: slideOut 0.3s ease forwards;
    }

.vertical-divider {
    width: 2px;
    background-color: var(--background);
    height: 72px;
    margin: 10px 5px 10px 15px;
}

.quick-swap-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
}

.quick-swap-scroll {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-top: 0px;
    padding-left: 10px;
}

.quick-swap-square {
    border: 1px solid var(--accent);
    width: 67px;
    height: 72px;
    background-color: #FFFFFF;
    border-radius: 5px;
    cursor: pointer;
}

    .quick-swap-square:hover {
        outline: 2px solid var(--accent);
        outline-offset: 0;
    }

@keyframes slideOut {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

.checkbox-container {
    position: relative;
    width: 16px;
    height: 16px;
}

    .checkbox-container input[type="radio"],
    .checkbox-container input[type="checkbox"] {
        appearance: none;
        width: 100%;
        height: 100%;
        border: 2px solid var(--accent);
        border-radius: 4px;
        background-color: var(--secondary-background);
        cursor: pointer;
        transition: background-color 0.3s;
    }

        .checkbox-container input[type="radio"]:checked,
        .checkbox-container input[type="checkbox"]:checked {
            background-color: var(--accent);
        }

input[type="number"] {
    width: 80px;
    padding: 6px;
    border: 2px solid var(--accent);
    border-radius: 4px;
    background-color: var(--secondary-background);
    color: var(--text);
    font-size: 14px;
}

select {
    width: 100px;
    padding: 6px;
    border: 2px solid var(--accent);
    border-radius: 4px;
    background-color: var(--secondary-background);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
}

.dropdown-label {
    font-size: 14px;
    color: var(--text);
    margin-right: 10px;
}

.percentage-label {
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--accent);
    font-size: 14px;
}

.percentage-control {
    display: flex;
    align-items: center;
}

    .settings_box .percentage-control input[type="range"] {
        flex-grow: 1;
        margin-right: 10px;
        accent-color: var(--accent);
        cursor: pointer;
        -webkit-appearance: none;
        height: 5px;
        border-radius: 3px;
        background: var(--slider-track); /* fallback before JS kicks in */
        transition: background 0.2s ease;
    }

        .percentage-control input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 16px;
            height: 16px;
            background: var(--accent);
            border-radius: 50%;
            cursor: pointer;
        }

        .percentage-control input[type="range"]::-moz-range-track {
            height: 5px;
            border-radius: 3px;
            background: var(--slider-track);
        }

        .percentage-control input[type="range"]::-moz-range-progress {
            background: var(--accent);
            height: 5px;
            border-radius: 3px;
        }

        .percentage-control input[type="range"]::-moz-range-thumb {
            width: 16px;
            height: 16px;
            background: var(--accent);
            border: none;
            border-radius: 50%;
            cursor: pointer;
        }

    .percentage-control input[type="number"] {
        width: 60px;
        background-color: var(--secondary-background);
        color: var(--text);
        border: 1px solid var(--accent);
        border-radius: 3px;
        padding: 5px;
        text-align: right;
        font-size: 14px;
    }

        .percentage-control input[type="number"]::-webkit-outer-spin-button,
        .percentage-control input[type="number"]::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

    .percentage-control input[type="number"] {
        -moz-appearance: textfield;
    }

.blank-line {
    height: 16px;
}


/* New save-settings-box */
#manual-save-db {
    position: absolute;
    left: calc(53.33vw + 590px);
    top: 650px;
    width: 150px;
    height: 52px;
    background-color: var(--secondary-background);
    border: 1px solid var(--accent);
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
    transition: left 0.3s ease, background-color 0.3s ease;
    text-align: center;
    line-height: 52px; /* Center text vertically */
}

.container.shifted #manual-save-db {
    left: calc(53.33vw + 488px);
}

#manual-save-db:hover {
    background-color: var(--accent);
    color: var(--background);
}

#manual-save-db.saving {
    background-color: var(--accent);
    color: var(--background);
    cursor: not-allowed;
}



/* Subscription Page Styles */
.subscription-container {
    position: fixed;
    display: flex;
    top: 118px;
    justify-content: center;
    gap: 20px;
    padding: 0 10px;
    transition: margin-left 0.3s ease;
}

    .subscription-container.shifted {
        margin-left: 200px;
    }

.subscription-box {
    width: 400px;
    flex-shrink: 0;
    height: 66vh;
    background-color: var(--secondary-background);
    border: 1px solid var(--accent);
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.subscription-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 10px;
}

.subscription-description {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 10px;
    flex-grow: 1;
}

    .subscription-description ul {
        list-style: none;
        padding: 0;
        margin: 10px 0 0;
        font-size: 14px;
        line-height: 1.5;
        text-align: left;
    }

    .subscription-description li {
        margin: 2px 0;
    }

        .subscription-description li::before {
            content: '';
            margin-right: 5px;
        }

        .subscription-description li.check::before {
            content: '✔';
            color: var(--accent);
        }

        .subscription-description li.cross::before {
            content: '✖';
            color: var(--accent);
        }

.subscription-button {
    width: 95%;
    background-color: var(--secondary-background);
    color: var(--text);
    border: 1px solid var(--accent);
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s, color 0.3s;
    position: relative;
}

    .subscription-button:hover {
        background-color: var(--accent);
        color: var(--background);
    }

.most-popular {
    position: absolute;
    background-color: var(--accent);
    color: var(--background);
    padding: 5px 10px;
    font-size: 12px;
    font-weight: bold;
    display: none;
    width: 100px;
    left: 10px;
    z-index: 10;
}

.subscription-button[data-most-popular="monthly"] .most-popular {
    display: block;
    top: -25px;
    border-radius: 5px 5px 0 0;
}

.subscription-button[data-most-popular="yearly"] .most-popular {
    display: block;
    bottom: -25px;
    border-radius: 0 0 5px 5px;
}

/* Account page boxes (Standard Flow) */
.account-box, .sub-box {
    top: 118px;
    width: 1050px; /* Base size for the single box */
    background-color: var(--secondary-background, #2a2a2a);
    border: 1px solid var(--accent, #ffcc00);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 9999;
}

/* --- MAIN CONTAINER (Now handles all two-column layout) --- */
.sub-container {
    display: flex;
    gap: 20px;
    flex-wrap: nowrap;
    align-items: flex-start;
    width: 80vw;
    max-width: 1200px;
    margin: 20px auto 0;
    z-index: 9999;
}

/* --- LEFT COLUMN STYLES (For Subscription/Payment) --- */
.left-column-stack {
    /* Define this as a vertical stack for the left side */
    display: flex;
    flex-direction: column;
    gap: 20px; /* Space between the stacked boxes on the left */
    /* This width ensures it aligns perfectly with the right column */
    flex: 1 1 39.3vw;
    min-width: 39.3vw;
    max-width: 39.3vw;
    z-index: 9999;
}

/* Reset the left box styling to be a flexible item inside the left column wrapper */
.sub-box.left {
    flex: 1 1 auto;
    width: 100%; /* Fill the width of the parent column */
    min-width: auto;
    max-width: none;
    height: auto;
    min-height: 180px; /* Reset min-height for flexibility */
}

/* --- RIGHT COLUMN STYLES (Security, Help, Actions) --- */
.right-column-stack {
    /* Stacks all right-side boxes vertically */
    display: flex;
    flex-direction: column;
    gap: 20px; /* Space between Security box and the new Help/Actions row */
    /* This width ensures it matches the left column and fits the layout */
    flex: 1 1 39.3vw;
    min-width: 29.3vw;
    max-width: 29.3vw;
    z-index: 9999;
}

/* Reset security box to fill 100% width of the right column */
.sub-box.security {
    flex: 0 0 auto;
    width: 85%;
    min-width: auto;
    max-width: none;
    margin: 0;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    border-radius: 8px;
}

/* --- NEW HORIZONTAL ROW FOR HELP BOX AND ACTION BUTTONS --- */
.help-actions-row {
    display: flex; /* Makes children (Help Box and Action Buttons) go side-by-side */
    gap: 20px; /* Space between the two elements */
    width: 100%; /* Ensures this row fills the full width of the right-column-stack */
    flex: 0 0 auto; /* Prevent stretching */
}

/* 1. Help Box (3/5 width) */
.sub-box.help {
    width: 50%; /* 3/5 width */
    flex-shrink: 0;
    /* Inherits standard box styling (.sub-box) */
    margin: 0;
    min-height: 180px; /* Ensure consistency with action buttons */
}

/* 2. Action Buttons Stack (2/5 width) */
.action-buttons-stack {
    top: 119px;
    /* Visual Styling (Specific to this box) */
    background-color: var(--secondary-background, #2a2a2a);
    border: 1px solid var(--accent, #ffcc00);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    
    /* Layout Styling */
    width: 40%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 15px;
    padding: 15px;
    position: relative; 
    z-index: 9999;
}

/* Ensure buttons take equal vertical space and are "skinny" */
.action-button-form {
    flex-grow: 1; /* Allows forms/buttons to fill available vertical space */
    display: flex; /* Ensure the button inside the form fills it */
    position: relative;
    z-index: 9999;
    width: 100%;
    padding: 0;
}

/* Button height fix for "skinny" look */
.action-button, .small-button {
    width: 100%;
    height: 100%; /* Crucial to fill the tall form container */
    box-sizing: border-box;
    background-color: var(--secondary-background, #2a2a2a);
    color: var(--text, #ffffff);
    border: 1px solid var(--accent, #ffcc00);
    padding: 10px 15px; /* Adjust padding to make them tall */
    border-radius: 5px;
    cursor: pointer !important;
    font-size: 16px;
    line-height: 1.5;
    transition: background-color 0.3s, color 0.3s;
    z-index: 9999;
    pointer-events: auto !important;
    position: relative;
    outline: none;
}


/* --- General Content Styling (Unchanged/Refined) --- */
.box-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent, #ffcc00);
    margin-bottom: 10px;
    text-align: center;
}

.box-content {
    font-size: 16px;
    color: var(--text, #ffffff);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    flex-grow: 1;
}

.box-content p {
    margin: 5px 0;
}

.box-content a {
    color: var(--accent, #ffcc00);
    text-decoration: none;
}

.box-content a:hover {
    text-decoration: underline;
}

.content-divider {
    border: none;
    border-top: 1px solid var(--accent, #ffcc00);
    margin: 15px 0;
    opacity: 0.5;
}

.action-button:hover, .small-button:hover {
    background-color: var(--accent, #ffcc00);
    color: var(--background, #1a1a1a);
}

.small-button.delete-button {
    border-color: var(--danger, #ff4d4d);
    color: var(--danger, #ff4d4d);
}

.small-button.delete-button:hover {
    background-color: var(--danger, #ff4d4d);
    color: var(--text, #ffffff);
}




.input-groupp.inline-input-groupp {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 10px;
    width: 100%;
}

.input-labell {
    font-size: 16px;
    color: var(--text, #ffffff);
    margin-right: 10px;
    width: 150px; /* Fixed width for consistent alignment */
}

.input-fieldd {
    padding: 10px;
    font-size: 16px;
    border: 1px solid var(--accent, #ffcc00);
    border-radius: 5px;
    background-color: var(--secondary-background, #2a2a2a);
    color: var(--text, #ffffff);
    flex-grow: 1;
}

.login-button {
    width: 100%;
    background-color: var(--secondary-background, #2a2a2a);
    color: var(--text, #ffffff);
    border: 1px solid var(--accent, #ffcc00);
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s, color 0.3s;
}

.login-button:hover {
    background-color: var(--accent, #ffcc00);
    color: var(--background, #1a1a1a);
}

/* Logs Page Styles */
.logs-box {
    position: fixed;
    top: 118px;
    width: 80vw;
    height: 75vh;
    background-color: var(--secondary-background);
    border: 1px solid var(--accent);
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.5;
    z-index: 100;
}

.logs-content {
    display: flex;
    flex-direction: column-reverse;
    min-height: 0;
}

.log-entry {
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.5;
}


/* Help Page Styles */ 
div.help-container {
    position: fixed;
    top: 118px;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    grid-template-rows: repeat(3, auto) !important;
    gap: 15px 15px !important;
    width: 70vw !important;
    max-height: 460px !important;
    padding: 5px !important;
    margin: 5px auto 0 !important;
    transition: margin-left 0.3s ease !important;
}

    div.help-container.shifted {
        margin-left: calc(((100vw - 250px) / 2) - ((100vw - 250px) / 2)) !important;
        margin-right: auto !important;
    }

    div.help-container .help-box {
        /*width: 90% !important;*/
        /*height: 180px !important;*/
        background-color: var(--secondary-background) !important;
        border: 1px solid var(--accent) !important;
        border-radius: 5px !important;
        padding: 30px !important; /* 15 changed to 30 */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        /*margin: 0 auto !important;*/
    }

    div.help-container .help-title {
        font-size: 18px !important;
        font-weight: bold !important;
        color: var(--accent) !important;
        margin-bottom: 5px !important;
    }

    div.help-container hr {
        width: 80% !important;
        border: 1px solid var(--accent) !important;
        margin: 3px 0 !important;
    }

    div.help-container .help-content {
        font-size: 14px !important;
        color: var(--text) !important;
        flex-grow: 1 !important;
        line-height: 1.4 !important;
        word-wrap: break-word !important;
    }

    div.help-container .help-button {
        font-size: 14px !important;
        color: var(--text) !important;
        background: none !important;
        border: none !important;
        padding: 0 !important;
        cursor: pointer !important;
        text-decoration: underline !important;
        display: inline !important;
        margin: 0 3px !important;
        transition: color 0.3s !important;
    }

        div.help-container .help-button:hover {
            color: var(--accent) !important;
        }

/* FAQ Page Styles */
div.content-container {
    position: fixed;
    top: 118px;
    display: flex !important;
    justify-content: center !important;
    padding: 0 10px !important;
    width: 100% !important;
    transition: margin-left 0.3s ease !important;
}

    div.content-container.shifted {
        margin-left: calc(((100vw - 250px) / 2) - (80% / 2)) !important;
        margin-right: auto !important;
    }

    div.content-container .content-box {
        flex: 0 0 80% !important;
        background-color: var(--secondary-background) !important;
        border: 1px solid var(--accent) !important;
        border-radius: 5px !important;
        padding: 20px !important;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
        font-size: 16px !important;
        line-height: 1.5 !important;
        text-align: center !important;
    }


/* Landing Page Slideshow */
.slideshow-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 0 !important;
    background-color: var(--background) !important;
}

.slide {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    transition: opacity 0.8s ease !important;
    background-color: #333 !important;
}

    .slide img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

.nav-container {
    position: absolute !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    z-index: 10 !important;
}

.nav-dot {
    width: 12px !important;
    height: 12px !important;
    background-color: var(--secondary-background) !important;
    border-radius: 50% !important;
    border: 1px solid var(--accent) !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
}

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

.nav-triangle {
    width: 12px !important;
    height: 12px !important;
    background: none !important;
    border: none !important;
    color: var(--accent) !important;
    font-size: 12px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

    .nav-triangle:hover, .nav-dot:hover {
        opacity: 0.8 !important;
    }

/* Log In and Sign Up Buttons */
.auth-button {
    position: fixed !important;
    top: 20px !important;
    padding: 10px 20px !important;
    background-color: var(--secondary-background) !important;
    color: var(--primary-text) !important;
    border: 1px solid var(--accent) !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease, transform 0.2s ease !important;
    z-index: 10 !important;
}

    .auth-button.login {
        right: 150px !important;
    }

    .auth-button.signup {
        right: 20px !important;
    }

    .auth-button:hover {
        background-color: var(--accent) !important;
        transform: scale(1.05) !important;
    }

/* New rules to hide menu and theme toggle on login and logs pages */
:root[data-page="login"] .menu-button,
:root[data-page="login"] .theme-toggle,
:root[data-page="signup"] .menu-button,
:root[data-page="signup"] .theme-toggle {
    display: none !important;
}

/* Login Page Styles */
/* New wrapper to center the entire block */
.signup-page-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex; /* Makes the wrapper a flex container */
    align-items: flex-start; /* Aligns items to the top */
    gap: 30px; /* Space between the login form and the new box */
}

.login-container {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background-color: var(--secondary-background) !important;
    border: 1px solid var(--accent) !important;
    border-radius: 5px !important;
    padding: 40px !important;
    width: 400px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
    z-index: 10 !important;
}

/* New Tip Box: Positioned to the right of the login box */
.signup-tip-box {
    position: absolute;
    top: 100%;
    /* Calculate the left position relative to the center of the page.
       It's 50% (page center) + half the login box width (200px) + a small gap (e.g., 20px). */
    left: calc(50% + 220px);
    transform: translateY(-100%); /* Centers it vertically relative to the top 50% */
    
    background-color: var(--secondary-background);
    border: 1px solid var(--accent);
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 300px; /* Adjust for "smallish" size */
    height: fit-content; /* Make the height fit the content */
}

.tip-box-title {
    color: var(--text);
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 15px;
}

.tip-box-content p {
    color: var(--text);
    line-height: 1.6;
    margin: 0;
}

.login-title {
    font-size: 2rem !important;
    color: var(--text) !important;
    margin: 0 0 20px 0 !important;
    text-align: center !important;
}

.input-group {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
}

.input-label {
    font-size: 1.1rem !important;
    color: var(--text) !important;
    font-weight: 500 !important;
}

.input-field {
    padding: 10px !important;
    font-size: 1rem !important;
    border: 1px solid var(--accent) !important;
    border-radius: 5px !important;
    background-color: var(--background) !important;
    color: var(--text) !important;
    outline: none !important;
    transition: border-color 0.3s ease !important;
}

    .input-field:focus {
        border-color: var(--text) !important;
    }

.login-button {
    padding: 12px 20px !important;
    font-size: 1.1rem !important;
    background-color: var(--accent) !important;
    color: var(--secondary-background) !important;
    border: none !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    width: 100% !important;
    transition: background-color 0.3s ease, transform 0.2s ease !important;
}

    .login-button:hover {
        background-color: var(--text) !important;
        transform: scale(1.05) !important;
    }

.signup-text {
    font-size: 0.9rem !important;
    color: var(--text) !important;
    margin: 10px 0 0 0 !important;
    text-align: center !important;
}

.signup-link {
    color: var(--accent) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}

    .signup-link:hover {
        text-decoration: underline !important;
    }


/*Error page styles */

.error-box {
    background-color: var(--secondary-background);
    position: relative;
    color: var(--text);
    top: 58px;
    width: 80%;
    margin: 20px auto;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.4s ease;
    box-shadow: 0 0 0 transparent;
    border: 1px solid var(--accent);
}

.toggle-error {
    padding: 14px 20px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    background-color: var(--secondary-background);
    transition: background-color 0.3s ease;
}

/* FIXED: use the correct class from HTML (.error-divider), and add horizontal margin */
.error-divider {
    height: 1px;
    background-color: var(--accent);
    margin: 5px 20px 10px 20px; /* 5px below title, 10px space below divider */
}

/* content box initially collapsed */
.error-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.5s ease;
    background-color: var(--secondary-background);
    padding: 0 20px;
}

/* when expanded, apply padding */
.error-box.expanded .error-content {
    padding: 0 20px 10px 20px; /* bottom 10px padding only */
}

/* FIXED: add spacing above description text */
.error-description {
    margin-top: 10px;
    line-height: 1.5;
    color: var(--t


.setup-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.setup-box {
    background-color: var(--secondary-background);
    border: 1px solid var(--accent);
    border-radius: 8px;
    width: 80%;
    max-width: 900px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.setup-title {
    padding: 14px 20px;
    font-size: 18px;
    font-weight: bold;
    background-color: var(--secondary-background);
    border-bottom: 1px solid var(--accent);
    color: var(--text);
}

.video-wrapper {
    padding: 14px 20px;
    background-color: var(--secondary-background);
}

/* Added for proportional video display */
.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}
    
.text-content {
    padding: 14px 20px;
    color: var(--text);
}




/* Main container for the entire checkout page */
.checkout-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
    gap: 2rem;
}

@media (min-width: 768px) {
    .checkout-container {
        flex-direction: row;
    }
}

/* Container for the buttons on the left side */
.buttons-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem;
    background-color: var(--secondary-background);
    border: 1px solid var(--accent);
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .buttons-container {
        width: 33.333%;
    }
}

/* Individual plan container boxes */
.plan-box {
    background-color: var(--background);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--accent);
    transition: transform 0.3s ease-in-out;
}

.plan-box:hover {
    transform: translateY(-5px);
}

.plan-title {
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.75rem;
    color: var(--text);
}

/* Monthly and Yearly button styles */
.plan-button {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 9999px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-decoration: none; /* For the anchor tags */
    display: inline-block;
    margin-top: 0.5rem;
}

.plan-button.monthly {
    background-color: var(--accent);
    color: var(--background);
    border: none;
}

.plan-button.monthly:hover {
    background-color: var(--accent-hover);
}

.plan-button.yearly {
    background-color: var(--secondary-background);
    color: var(--text);
    border: 1px solid var(--accent);
}

.plan-button.yearly:hover {
    background-color: var(--accent);
    color: var(--background);
}

/* Cancel button container */
.cancel-box {
    background-color: var(--background);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--accent);
    text-align: center;
}

.cancel-link {
    display: block;
    color: var(--accent-light);
    font-weight: bold;
    text-decoration: none;
}

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

/* Container for the Stripe payment form */
.stripe-container {
    width: 100%;
    padding: 1rem;
    background-color: var(--secondary-background);
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--accent);
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (min-width: 768px) {
    .stripe-container {
        width: 66.666%;
    }
}

/* Loading spinner */
.loading-spinner {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-light);
}

.loading-spinner svg {
    animation: spin 1s linear infinite;
    height: 2rem;
    width: 2rem;
    color: var(--accent);
    margin: 0 auto 1rem;
}

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

