/* --- General Body & Header Styles --- */
body {
    background: #1a1a1a;
    color: #fff;
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    padding-top: 72px;
    /* Space for the fixed navbar */
}

/* Header Logo and Text Scaling (for big circular logo/text) */
.header {
    position: relative;
    background: linear-gradient(135deg, #ff6200, #141414 80%);
    padding: 0 20px 60px 20px;
    /* Remove all top padding to eliminate black space */
    text-align: center;
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    align-items: center;
       
        min-height: auto;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    pointer-events: none;
    z-index: 0;
}

.header h1 {
    font-size: 3.5rem;
    font-weight: bold;
    text-transform: uppercase;
    background: linear-gradient(90deg, #fff, #ff6200);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 1;
    margin-top: 50px;
    /* Ensure space between navbar and header text */
    text-shadow: 0 0 8px rgba(255, 98, 0, 0.6);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.header img {
    max-width: 150px;
    height: auto;
    margin-bottom: 1rem;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 98, 0, 0.2), transparent);
    animation: pulse 10s infinite;
}

.header h1 {
    font-size: 3.5rem;
    font-weight: bold;
    text-transform: uppercase;
    background: linear-gradient(90deg, #fff, #ff6200);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 1;
    margin-top: 50px;
    /* Ensure space between navbar and header text */
}

.header p {
    font-size: 1.2rem;
    color: #ccc;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.header .typed-text {
    font-size: 1.7rem;
    color: #ffc300;
    font-weight: bold;
    margin-top: 10px;
    min-height: 2rem;
}

/* Stabilize typed-text height to prevent layout shifts affecting autofill popup */
#typed-text {
    height: 2rem; /* Fixed height based on tallest phrase */
    line-height: 2rem; /* Match line height for vertical alignment */
    overflow: hidden;
    white-space: nowrap;
    display: inline-block;
    vertical-align: bottom;
    font-family: monospace, monospace; /* Optional: fixed-width font for consistent width */
}

/* --- Bootstrap 5 Navbar Overrides (Dark/Orange Theme) --- */
.navbar {
    background: #232323 !important;
    /* Remove border and box-shadow to eliminate black line */
    border-bottom: none;
    box-shadow: none;
    z-index: 1100 !important;
}

.navbar .dropdown-menu {
    z-index: 1200 !important;
}

.header {
    position: relative;
    z-index: 1;
}

.navbar .navbar-brand {
    color: #ff6200 !important;
    font-weight: 900;
    font-size: 1.7rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Navbar Logo Scaling */
.navbar .navbar-brand img {
    max-height: 40px;
    height: auto;
    transition: transform 0.3s ease;
    vertical-align: middle;
    align-self: center;
    margin-bottom: 0 !important;
}

.navbar .navbar-brand:hover img {
    transform: scale(1.1);
}

/* Modern Menu Enhancements */
.navbar-nav .nav-link {
    display: flex;
    align-items: center;
    color: #e0e0e0 !important;
    font-weight: 600;
    border-radius: 5px;
    padding: 0.5rem 1rem;
    margin-left: 0.2rem;
    margin-right: 0.2rem;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active {
    background: rgba(255, 98, 0, 0.2) !important;
    color: #fff !important;
    transform: translateY(-2px);
}

.dropdown-item {
    display: flex;
    align-items: center;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background-color: #ff6200 !important;
    color: #fff !important;
}

.navbar .dropdown-menu {
    background: #232323;
    border: 1px solid #ff6200;
}

.navbar .dropdown-item {
    color: #e0e0e0;
    font-weight: 600;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item.active {
    background: #ff6200;
    color: #fff;
}

.navbar .navbar-toggler {
    border-color: #ff6200;
}

/* Revert to Bootstrap default hamburger icon */
.navbar .navbar-toggler .navbar-toggler-icon {
    background-image: var(--bs-navbar-toggler-icon-bg, url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,1%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"));
    width: 1.5em;
    height: 1.5em;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
    border: none;
    display: block;
}

/* Responsive Adjustments (Mobile Smaller Logo/Text) */
@media (max-width: 991px) {
    .navbar .navbar-brand img {
        max-height: 30px;
    }

    .navbar .navbar-brand {
        font-size: 1.4rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 50vw;
        display: inline-block;
        vertical-align: middle;
    }

    .navbar-nav .nav-link {
        padding: 0.3rem 0.6rem;
        margin-left: 0.1rem;
        margin-right: 0.1rem;
        font-size: 0.9rem;
    }

    .navbar-collapse {
        flex-wrap: wrap;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .header img {
        max-width: 100px;
    }

    /* Fix for iisometric images overflow on mobile */
    img[src$="iisometric.png"],
    img[src$="iisometric-2.png"] {
        max-width: 100% !important;
        height: auto !important;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }

    body {
        padding-top: 60px;
    }
}

@media (max-width: 600px) {
    .navbar .navbar-brand img {
        max-height: 24px;
    }

    .navbar .navbar-brand {
        font-size: 1.2rem;
    }

    .navbar {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* Ensure body padding for fixed navbar */
body {
    padding-top: 60px;
    /* Reduce to match navbar height, avoid extra space */
}

@media (max-width: 991px) {
    body {
        padding-top: 60px;
    }
}

/* --- Content Section Styles --- */
.content-section {
    padding: 60px 20px;
    background: #2c2c2c;
    border-bottom: 1px solid #ff6200;
}

.content-section h2 {
    color: #ff6200;
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 40px;
}

.steps-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}









.highlight {
    color: #00ff80;
    font-weight: bold;
}

/* --- Auth Card Styles --- */
.auth-card {
    background: #2c2c2c;
    border: 2px solid #ff6200;
    border-radius: 15px;
    padding: 30px;
    max-width: 900px;
    margin: 40px auto;
    box-shadow: 0 5px 20px rgba(255, 98, 0, 0.2);
}

.auth-btn-row {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    margin-top: 10px;
}

.form-label {
    color: #fff;
    font-weight: bold;
}

.form-control {
    background: #3a3a3a;
    border: 1px solid #ff6200;
    color: #fff;
    border-radius: 5px;
}

.form-control:focus {
    border-color: #e65c00;
    box-shadow: 0 0 5px rgba(255, 98, 0, 0.5);
}

.form-control::placeholder {
    color: #999999;
}

.btn-orange {
    background-color: #ff6200;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: none;
    
    /* Remove absolute positioning */
    position: static;
    /* Default positioning */
    transform: none;
    /* Reset transform */
    margin-top: 15px;
}

.btn-orange:hover {
    background-color: #ea7024;
    transform: scale(1.05);
}

.btn-orange:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 98, 0, 0.3);
}

/* --- Presale Phases Styles --- */
.phases-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
    align-items: stretch;
    /* Ensure all grid items stretch to the same height */
}

.phase-card {
    background: #232323;
    border-left: 5px solid #ff6200;
    padding: 1.5rem;
    border-radius: 8px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    /* Enable flexbox */
    flex-direction: column;
    /* Stack content vertically */
    min-height: 280px;
    /* Set a minimum height for consistency */
}

.phase-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 98, 0, 0.2);
}

.phase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.phase-title {
    background: #ff6200;
    color: #fff;
    padding: 0.19rem 0.8rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1rem;
}

.phase-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
}

.phase-details {
    list-style: none;
    padding: 0;
    margin: 0;
}

.phase-details li {
    margin-bottom: 0.5rem;
    color: #ccc;
}

.phase-details li strong {
    color: #fff;
    margin-right: 8px;
}

.phase-notes {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #3a3a3a;
    font-style: italic;
    color: #ffc107;
}

/* --- Footer Styles --- */
.footer {
    background: #2c2c2c;
    padding: 20px 20px;
    text-align: center;
    border-top: 1px solid #ff6200;
}

.footer p {
    color: #ccc;
    font-size: 0.9rem;
}

/* --- Keyframe Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

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

    50% {
        transform: scale(1.1);
    }

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

@keyframes float {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0.8;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        transform: translateY(100vh) translateX(10vw);
        opacity: 0;
    }
}

@keyframes shine {
    0%, 100% {
        filter: brightness(1) saturate(1);
    }
    50% {
        filter: brightness(1.3) saturate(1.2);
    }
}

.shining {
    animation: shine 2s infinite;
}

/* --- Responsive SimpleSwap Exchange Widget --- */
@media (max-width: 600px) {
    .exchange-widget {
        max-width: 100vw;
        min-width: 0;
    }

    .header h1 {
        font-size: 2rem;
    }

    .header p {
        font-size: 1rem;
    }

    .header .typed-text {
        font-size: 1rem;
    }

    .content-section h2 {
        font-size: 2rem;
    }

   

    .auth-card {
        padding: 20px;
        margin: 20px;
    }

    .auth-btn-row {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
}

@media (min-width: 768px) {
    .phases-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Ensure Chart.js tooltip is always above chart center text */
.chartjs-tooltip,
.chartjs-tooltip *,
.chartjs-tooltip-container {
    z-index: 9999 !important;
    position: absolute !important;
    pointer-events: auto;
}

@media (max-width: 991px) {

    .navbar-collapse.show,
    .navbar-collapse.collapsing {
        background: #232323 !important;
        box-shadow: 0 8px 24px 0 rgba(0, 0, 0, 0.25);
        border-radius: 0 0 12px 12px;
    }

    .navbar-nav {
        background: transparent;
    }
}

/* Ensure password toggle icon is behind the fixed navbar */
#login-register .input-group {
    z-index: 0;
    /* Lower than navbar's z-index (1100/1200) */
    position: relative;
    /* Needed for z-index to take effect */
}

#countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
}

#countdown-timer svg {
    display: block;
    margin: 0 auto;
}

.widget-container {
    width: 100%;
    overflow-x: hidden;
}

/* --- Terms and Conditions Modal Styles --- */
#termsModal .modal-content {
    background: #232323;
    /* Darker background to match theme */
    border: 2px solid #ff6200;
    /* Orange border */
    border-radius: 1rem;
    /* Added border-radius for rounded corners */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    /* Soft shadow */
}

/* Updated modal-dialog to be responsive and properly centered */
#termsModal .modal-dialog {
    /* Set a custom max-width to make the modal smaller */
    max-width: 500px;
    /* The 'modal-dialog-centered' class from Bootstrap already handles centering,
       but we add margin: auto as a fallback for consistency. */
    margin: auto;
}

/* New: Media query to apply mobile-specific styles and spacing */
@media (max-width: 767.98px) {
    #termsModal .modal-dialog {
        /* Add 20px of space on the left and right for mobile view */
        padding: 0 20px;
        /* Ensures the modal content doesn't get squished */
        max-width: 100%;
        /* Prevents the modal from being pushed out of the viewport */
        margin-left: auto;
        margin-right: auto;
    }
}

#termsModal .modal-header,
#termsModal .modal-footer {
    border-color: #3a3a3a;
    /* Subtle divider lines */
}

#termsModal .modal-title {
    color: #ff6200;
    /* Orange title */
    font-weight: bold;
    /* Added bold font weight for better visibility */
}

#termsModal .btn-outline-secondary {
    border-color: #ff6200;
    color: #ff6200;
    transition: all 0.3s ease;
}

#termsModal .btn-outline-secondary:hover {
    background-color: #ff6200;
    color: #fff;
}

/* New: Make both footer buttons the same size using Flexbox on the parent */
#termsModal .modal-footer {
    display: flex;
    /* Enables Flexbox on the button container */
    gap: 1rem;
    /* Adds space between the buttons */
    /* Aligns buttons to the right side of the footer */
    justify-content: flex-end;
}

/* New: Apply flex-grow to buttons to ensure equal width */
#termsModal .modal-footer .btn {
    flex-grow: 1;
    /* Limits the max width to ensure they don't get too large on desktop */
    max-width: 150px;
    padding: 10px 20px;
    margin: auto;
}

/* Make the body scrollable and add padding */
#termsModalBody {
    padding: 20px;
    color: #ccc;
    /* Lighter text for readability */
    max-height: 60vh;
    /* Set a max height for the scrollable area */
    overflow-y: auto;
    /* Enable vertical scrolling */
}

/* Style for the scrollbar to match the theme */
#termsModalBody::-webkit-scrollbar {
    width: 8px;
}

#termsModalBody::-webkit-scrollbar-track {
    background: #2c2c2c;
}

#termsModalBody::-webkit-scrollbar-thumb {
    background-color: #ff6200;
    border-radius: 4px;
    border: 2px solid #2c2c2c;
}
/* Keep Toastify text and close button on the same line */
.toastify {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    word-break: break-word;
    /* Allow long words to break and wrap */
}

.toast-close {
    margin-left: 10px;
    /* space between text and X */
    flex-shrink: 0;
    /* prevent shrinking */
}

/* Ensure Toastify is fully visible below fixed navbar on mobile */
@media (max-width: 768px) {
    .toastify {
        top: 70px !important;
        /* navbar height (60px) + 10px gap */
        right: 10px !important;
        /* Reduced padding from right edge to prevent left overflow */
        z-index: 99999 !important;
        /* ensure it's above navbar */
        max-width: calc(100vw - 20px) !important;
        /* Limit width to viewport minus padding */
        word-break: break-word !important;
        /* Ensure wrapping on mobile */
    }

    /* Make the placeholder text smaller for password input on mobile */
    #password::placeholder {
        font-size: 0.7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
/* Ensure all step-card boxes in Why Join the TETHERSOL Presale? are the same size */
.steps-container {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: center;
    align-items: stretch;
}
.step-card {
    flex: 1 1 260px;
    min-width: 260px;
    max-width: 340px;
    min-height: 320px;
    background: #232323;
    border: 2px solid #ff6200;
    border-radius: 16px;
    padding: 32px 18px 24px 18px;
    margin: 0 0 24px 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    transition: box-shadow 0.2s;
}
.step-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(255, 98, 0, 0.3);
}
.step-card h3 {
    color: #ff6200;
    font-size: 1.35rem;
    margin-bottom: 16px;
    font-weight: bold;
}
.step-card p {
    color: #fff;
    font-size: 1.05rem;
    flex: 1 1 auto;
    margin-bottom: 0;
}
@media (max-width: 900px) {
    .steps-container {
        flex-direction: column;
        align-items: stretch;
    }
    .step-card {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    html[lang="ru"] .step-card {
        min-width: auto;
        max-width: 100%;
        word-break: break-word;
        overflow-wrap: break-word;
    }
}
/* --- Roadmap Section Styles --- */
.roadmap-container {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.roadmap-container::before {
  content: "";
  position: absolute;
  left: 25px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #ff6200;
}

.roadmap-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  position: relative;
}

.roadmap-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: #ff6200;
  color: #fff;
  font-weight: bold;
  font-size: 1.2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(255, 98, 0, 0.6);
}

.roadmap-content {
  background: #232323;
  border: 2px solid #ff6200;
  border-radius: 12px;
  padding: 20px;
  flex: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.roadmap-content h3 {
  color: #ff6200;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.roadmap-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.roadmap-content li {
  color: #ccc;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.roadmap-item:hover .roadmap-content {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(255, 98, 0, 0.3);
}

.roadmap-item.completed .roadmap-icon {
  background: #28a745;
  box-shadow: 0 0 10px rgba(40, 167, 69, 0.6);
}

@media (max-width: 768px) {
  .roadmap-container::before {
    left: 15px;
  }
  .roadmap-item {
    gap: 15px;
  }
  .roadmap-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

/* Custom style for TETHERSOL Documentations card to match auth and exchange box size */
#whitepaper-section .card {
    max-width: 600px;
}

.step-icon {
    color: #ff6200;
    font-size: 2.5rem;
    margin-bottom: 7px;
    margin-right: 8px;
    vertical-align: middle;
    display: inline-block;
}

/* Ensure Bootstrap Icons in step cards are visible and styled */
.step-card i.bi {
    color: #ff6200;
    font-size: 2.5rem;
    padding-bottom: 7px;
    vertical-align: middle;
    display: inline-block;
    margin-right: 8px;
}

/* --- Floating Animation for Images --- */
/* Removed floatAnimation keyframes */
/*
@keyframes floatAnimation {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}
*/

/* --- Shining Animation for Images --- */
/* Removed shineAnimation keyframes */
/*
@keyframes shineAnimation {
    0%, 100% {
        filter: brightness(1);
        opacity: 1;
    }
    50% {
        filter: brightness(1.5);
        opacity: 0.8;
    }
}
*/

/* Removed animations for these classes */
/*
.animated-float {
    animation: floatAnimation 4s ease-in-out infinite;
}

.animated-shine {
    animation: shineAnimation 3s ease-in-out infinite;
}
*/

/* --- Shining and Glow Animation for Header Text --- */
/* Removed textShine keyframes */
/*
@keyframes textShine {
    0%, 100% {
        text-shadow: 0 0 5px #ffffcc, 0 0 10px #ffffcc, 0 0 20px #ffffcc;
        color: #ffffcc;
    }
    50% {
        text-shadow: 0 0 20px #ffffe6, 0 0 30px #ffffe6, 0 0 40px #ffffe6;
        color: #fffff0;
    }
}
*/

/* Removed animation for .animated-header-text */
/*
.animated-header-text {
    animation: textShine 3s ease-in-out infinite;
    font-weight: bold;
}
*/

/* Disable animations on mobile for better scrolling performance */
@media (max-width: 768px) {
    .animated-header-text,
    .animated-float,
    .animated-shine,
    .particle,
    .header::before {
        animation: none !important;
    }
}
