body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(
        135deg,
        #1a1a1a 0%,
        #2d3748 25%,
        #1a202c 50%,
        #2d3748 75%,
        #1a1a1a 100%
    );
    background-attachment: fixed;
    color: #e2e8f0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.crypto-set-section {
    margin-top: auto;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.navbar-brand {
    font-family: 'Orbitron', monospace;
    font-size: 1.5em;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.language-switch {
    display: flex;
    gap: 10px;
}

.lang-btn {
    background: none;
    border: 2px solid rgba(255, 255, 255, 0.609);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn .flag {
    font-size: 1.2em;
}

.lang-btn:not(.active) .flag {
    filter: grayscale(100%);
}

.lang-btn.active {
    border-color: #64bacf;
    background-color: rgba(84, 130, 148, 0.235);
}

.hero {
    background-image: url('images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    text-align: center;
    padding: 80px 20px 40px;
    position: relative;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    backdrop-filter: blur(8px);
    background-color: rgba(0, 0, 0, 0.3);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.hero-border-wrapper {
    position: relative;
    max-width: 800px;
    margin-bottom: 40px;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(
        45deg,
        rgb(144, 112, 110, 0.9),
        rgba(13, 45, 53, .7),
        rgb(56, 53, 74, .7),
        rgba(13, 45, 53, .9)
    );
    background-size: 400% 400%;
    backdrop-filter: blur(5px);
    /* animation: gradientBorder 200s ease infinite; */
}

.hero-border-wrapper::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.hero-content {
    background: transparent;
    padding: 0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

@keyframes gradientBorder {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.hero-text {
    flex: 1.8;
    padding: 30px;
}

.hero-image {
    flex: 1.2;
    height: 100%;
    position: relative;
    display: flex;
    align-items: stretch;
    z-index: 5;
}

.hero-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: -20px;
    width: 40px;
    height: 100%;
    background: linear-gradient(
        to right,
        rgb(43, 50, 49, 0.9),
        rgba(144, 112, 110, 0.7),
        transparent
    );
    backdrop-filter: blur(2px);
    z-index: 6;
    pointer-events: none;
    border-radius: 0px 0 0 0px;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0 10px 10px 0;
  min-height: 240px;
  min-width: 270px;
  position: relative;
  z-index: 3;
  opacity: 0.7;
  /* background: rgba(255,255,255,0.15); */
  backdrop-filter: blur(12px);
}

.hero h1 {
    margin: 0;
    font-size: 1.5em;
    line-height: 1.5; /* Improved line height for readability */
    display: flex;
    align-items: flex-start; /* Align text to top of reserved space */
    z-index: 3;
}

.hero hr {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    border: none;
    height: 0.5px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.5),
        transparent
    );
    z-index: 2;
}

.cursor {
    display: inline-block;
    animation: blink 1s infinite;
    font-weight: 100;
    font-size: 1em;
    color: #0d2d35;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero p {
    font-size: 1.2em;
    margin: 10px 0;
    text-align: left;
}

.container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

h2 {
    text-align: center;
    margin-bottom: 20px;
}

table.crypto-table {
    width: 100%;
    border-collapse: collapse;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.847),
        rgba(13, 45, 53, 1),
        rgba(56, 53, 74, 0.741),
        rgb(16, 12, 12)
    );
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 5px 4px 24px rgb(100, 186, 207, 0.3);
    position: relative;
}

.crypto-table thead tr {
    height: 40px;
}

.crypto-table tbody tr {
    height: 80px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.crypto-table tbody tr:last-child {
    border-bottom: none;
}

/* Column sizing */
.name-col, .chart-col {
    width: 25%;
}

.price-col {
    width: 15%;
}

.buy-btn-col, .sell-btn-col {
    width: 8%;
}

.change-col {
    width: 12%;
}

.crypto-table th {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    font-size: 0.9em;
    text-align: left;
    padding: 12px 16px;
    border: none;
}

.crypto-table td {
    padding: 16px;
    border: none;
    vertical-align: middle;
}

/* Name cell styling */
.name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.coin-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.coin-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.coin-name {
    color: white;
    font-weight: 600;
    font-size: 1em;
}

.coin-symbol {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85em;
    font-weight: 400;
}

/* Price cells */
.price-cell {
    color: white;
    font-weight: 600;
    font-size: 1em;
}

/* Trade buttons */
.btn-cell {
    padding: 8px;
}

.trade-btn {
    border: 2px solid rgba(255, 255, 255, 0.609);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    background: transparent;
}

.trade-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.buy-btn:hover {
    border-color: #26A17B;
    color: #26A17B;
}

.sell-btn:hover {
    border-color: #FF6B6B;
    color: #FF6B6B;
}

/* Change cell */
.change-cell {
    font-weight: 600;
    font-size: 0.9em;
}

.change-positive {
    color: #26A17B;
}

.change-negative {
    color: #FF6B6B;
}

/* Chart cell */
.chart-cell {
    padding: 8px 16px;
}

.spark-chart {
    width: 100%;
    height: 40px;
    object-fit: contain;
}

@media (max-width: 667px) {
    .hero {
        align-items: center; /* Center vertically on mobile */
        min-height: 100vh; /* Full viewport height for proper centering */
        padding: 80px 15px 60px; /* Adjust padding for mobile */
    }
    
    .hero-border-wrapper {
        margin-bottom: 0; /* Remove bottom margin on mobile */
        max-width: 90%; /* Allow more width usage on mobile */
    }
    
    .hero-content {
        padding: 0; /* Reset padding for mobile */
        flex-direction: column; /* Stack vertically on mobile */
    }
    
    .hero-text {
        padding: 25px; /* Padding for text area */
        order: 2; /* Move text below image on mobile */
    }
    
    .hero-image {
        order: 1; /* Move image above text on mobile */
        width: 100%;
        height: 200px; /* Fixed height for mobile */
    }
    
    .hero-image::before {
        left: 0;
        bottom: -20px;
        width: 100%;
        height: 20px;
        background: linear-gradient(
            to bottom,
            rgba(29, 28, 49, 0.575),
            rgba(43, 44, 46, 0.841),
            transparent
        );
        border-radius: 0 0 0px 0px;
    }
    
    .hero-image img {
        border-radius: 10px 10px 0 0; /* Rounded top corners on mobile */
    }
    
    .hero h1 {
        font-size: 1.3em; /* Slightly smaller font size */
        line-height: 1.4; /* Better line spacing */
    }
    
    .hero p {
        font-size: 1em; /* Adjust paragraph size */
    }
    
    /* Make container transparent on mobile */
    .container {
        background: transparent;
        padding: 0 5vw; /* Increased padding to give space for shadows */
    }
    
    table.crypto-table {
        font-size: 0.8em;
        width: 100%; /* Use full container width */
        margin-left: 0; /* Reset margin */
        background: transparent; /* Remove table background */
        box-shadow: none; /* Remove table shadow */
    }
    
    .crypto-table thead {
        display: none;
    }
    
    .crypto-table tbody tr {
        display: grid;
        grid-template-columns: 1fr 1fr; /* Two equal columns */
        grid-template-rows: auto auto; /* Two rows: header and buttons */
        gap: 16px;
        margin: 0 15px 20px 15px; /* Add horizontal margin for shadow space */
        background: linear-gradient(
            135deg,
          rgba(100, 186, 207, 0.179),
            rgba(13, 45, 53, 0.741),
            rgba(0, 0, 0, 0.163),
            rgba(1, 0, 6, 0.938)
        );
        border-radius: 8px;
        padding: 16px;
        height: auto;
        box-shadow: 3px 5px 12px rgb(100, 186, 207, 0.2);
        position: relative;
    }
    
    .crypto-table td {
        border: none;
    }
    
    /* Name cell - top left: icon + name/symbol */
    .name-cell {
        grid-column: 1;
        grid-row: 1;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        padding: 0;
        margin: 0;
    }

    .coin-icon {
        width: 50px !important;
        height: 50px !important;
        border-radius: 50%;
        flex-shrink: 0;
    }

    .coin-info {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .coin-name {
        font-size: 1.4em !important;
        font-weight: 700 !important;
        color: white !important;
        display: block;
        margin-bottom: 2px;
        line-height: 1.2;
    }

    .coin-symbol {
        font-size: 0.9em !important;
        color: rgba(255, 255, 255, 0.6) !important;
        font-weight: 400 !important;
        display: block;
        line-height: 1.2;
    }
    
    /* 24h change - top right */
    .change-cell {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        text-align: right;
        font-weight: 600;
        font-size: 0.9em;
    }
    
    /* Chart cell - also top right, below change */
    .chart-cell {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        align-items: flex-end;
        justify-content: flex-end;
        margin-top: 20px;
    }
    
    .spark-chart {
        width: 80px;
        height: 30px;
        object-fit: contain;
    }
    
    /* Buy section - bottom left */
    .price-cell:nth-of-type(2) { /* Buy price */
        grid-column: 1;
        grid-row: 2;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        margin: 0;
        padding: 0;
        padding-bottom: 50px;
    }
    
    .btn-cell:nth-of-type(3) { /* Buy button */
        grid-column: 1;
        grid-row: 2;
        display: flex;
        align-items: flex-end;
        justify-content: flex-start;
        margin: 0;
        padding: 0;
        margin-top: 8px;
        padding-left: 0;
      }
    
    /* Sell section - bottom right */
    .price-cell:nth-of-type(4) { /* Sell price */
        grid-column: 2;
        grid-row: 2;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        text-align: right;
        margin: 0;
        padding: 0;
    }
    
    .btn-cell:nth-of-type(5) { /* Sell button */
        grid-column: 2;
        grid-row: 2;
        display: flex;
        align-items: flex-end;
        justify-content: flex-end;
        margin: 0;
        padding: 0;
        margin-top: 8px;
    }
    
    .price-cell {
        font-size: 1.1em !important;
        font-weight: 600;
        color: white;
    }
    
    .price-cell::before {
        color: rgba(255, 255, 255, 0.8);
        font-size: 0.8em;
        font-weight: 500;
        display: block;
        margin-bottom: 4px;
    }
    
    .trade-btn {
        padding: 12px 16px !important;
        font-size: 0.85em !important;
        font-weight: 600;
        text-align: center;
        min-width: 155px; /* 2.5x the original 60px */
    }
    
    /* Show 24h change and chart on mobile in this layout */
    .change-cell,
    .chart-cell {
        display: flex;
    }
    
    .spark-chart {
        height: 30px;
    }
}

@media (max-width: 375px) {
    /* Extra small mobile devices - further reduce sizes */
    
    .crypto-table tbody tr {
        padding: 12px; /* Reduce card padding */
        gap: 12px; /* Reduce gap between elements */
    }
    
    /* Name cell - smaller icon and text */
    .coin-icon {
        width: 40px !important; /* Reduced from 50px */
        height: 40px !important;
    }

    .coin-name {
        font-size: 1.2em !important; /* Reduced from 1.4em */
        margin-bottom: 1px;
    }

    .coin-symbol {
        font-size: 0.8em !important; /* Reduced from 0.9em */
    }
    
    /* 24h change - smaller text */
    .change-cell {
        font-size: 0.8em; /* Reduced from 0.9em */
    }
    
    /* Chart - smaller size */
    .spark-chart {
        width: 70px; /* Reduced from 80px */
        height: 25px; /* Reduced from 30px */
    }
    
    /* Price sections - smaller text */
    .price-cell {
        font-size: 1em !important; /* Reduced from 1.1em */
    }
    
    .price-cell::before {
        font-size: 0.75em; /* Reduced from 0.8em */
    }
    
    /* Buttons - smaller size */
    .trade-btn {
        padding: 10px 16px !important; /* Reduced from 8px 16px */
        font-size: 0.8em !important; /* Reduced from 0.85em */
        min-width: 140px; 
    }
    
    /* Further reduce card gap for very small screens */
    .crypto-table tbody tr {
        margin: 0 10px 16px 10px; /* Reduced horizontal margin but still present */
    }
    
    /* Adjust container padding for very small screens */
    .container {
        padding: 0 4vw; /* Increased padding for shadow visibility */
    }
    
    table.crypto-table {
        width: 100%; /* Use full container width */
        margin-left: 0; /* Reset margin */
    }
}