/* =================================
   Full Updated CSS
   ================================= */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #f59e0b;
    --dark: #1e293b;
    --darker: #0f172a;
    --light: #f8fafc;
    --gray: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --surface: rgba(30, 41, 59, 0.8);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--darker) 0%, #1a2238 100%);
    color: var(--light);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 3rem 0;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    height: 2.5rem;
    border-radius: var(--radius-full);
}

.navbar {
    display: flex;
    gap: 2rem;
}

.navbar a {
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.navbar a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.navbar a:hover::after {
    width: 100%;
}

.menu-toggle, .search-icon {
    display: none;
    background: none;
    border: none;
    color: var(--light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.menu-toggle:hover, .search-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 300px;
    transition: var(--transition);
}

.search-form input {
    width: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--light);
    transition: var(--transition);
    opacity: 0;
}

.search-form.expanded {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 0.5rem;
}

.search-form.expanded input {
    width: 200px;
    padding: 0.5rem;
    opacity: 1;
}

.search-form button {
    display: none;
}

/* Game Banner Section */
.game-banner {
    width: 100%;
    padding: 2rem 0 1rem;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1) 0%, rgba(72, 149, 239, 0.1) 100%);
}

.banner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.banner-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

/* Game Info Section */
.game-info {
    padding: 2rem 0;
    text-align: center;
}

.game-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--primary-light), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.game-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--gray);
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
}

.meta-item i {
    color: var(--success);
}

/* Main Content */
.main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 2rem 0;
}

@media (min-width: 992px) {
    .main-grid {
        grid-template-columns: 2fr 1fr;
    }
}

/* Section Title */
.section-title {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: var(--radius-full);
}


/* =================================
   UPDATED DIAMOND SECTION (Mobile-First)
   ================================= */

/* Diamond Products - Mobile-First (3 Columns by default) */
.diamonds-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem; /* Smallest gap for mobile */
}

.diamond-card {
    background: var(--surface);
    border: 0.5px solid rgba(59, 130, 246, 0.15); /* Kept your update */
    border-radius: var(--radius); /* Smaller radius for small card */
    padding: 0.8rem; /* Smaller padding for mobile */
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    min-height: 150px; /* Smaller min-height */
}

.diamond-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
    opacity: 0;
    transition: var(--transition);
}

.diamond-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.diamond-card:hover::before {
    opacity: 1;
}

.diamond-card.selected {
    background: rgba(37, 99, 235, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.diamond-icon {
    width: 45px; /* Smaller icon for mobile */
    height: 45px;
    margin-bottom: 0.5rem; /* Smaller margin */
    object-fit: contain;
    transition: var(--transition);
    z-index: 1;
}

.diamond-card:hover .diamond-icon {
    transform: scale(1.15) rotate(5deg);
}

.diamond-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem; /* Smaller font for mobile */
    z-index: 1;
}

.diamond-sub {
    font-size: 0.75rem; /* Smaller font for mobile */
    color: var(--gray);
    margin-bottom: 0.6rem; /* Smaller margin */
    z-index: 1;
    line-height: 1.3;
}

.diamond-price {
    font-weight: 700;
    color: var(--secondary);
    font-size: 0.95rem; /* Smaller font for mobile */
    z-index: 1;
}

/* --- Media Queries to scale UP for larger screens --- */

@media (min-width: 640px) {
    .diamonds-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1.5rem;
    }

    /* Scale up card styles */
    .diamond-card {
        padding: 1.5rem;
        min-height: 200px;
        border-radius: var(--radius-lg); /* Return to larger radius */
    }

    .diamond-icon {
        width: 65px; /* Larger icon */
        height: 65px;
        margin-bottom: 1rem;
    }

    .diamond-name {
        font-size: 1.25rem; /* Larger font */
    }

    .diamond-sub {
        font-size: 0.9rem; /* Larger font */
        margin-bottom: 1rem;
    }

    .diamond-price {
        font-size: 1.25rem; /* Larger font */
    }
}

@media (min-width: 1024px) {
    .diamonds-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* =================================
   END OF UPDATED SECTION
   ================================= */


/* Order Sidebar */
.order-sidebar {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: var(--shadow-xl);
    position: sticky;
    top: 6rem;
}

.sidebar-title {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    text-align: center;
    background: linear-gradient(to right, var(--primary-light), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    padding-bottom: 1rem;
}

.sidebar-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    margin: 0.75rem auto;
    border-radius: var(--radius-full);
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: var(--gray);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.6);
    color: var(--light);
    font-family: inherit;
    transition: var(--transition);
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
    background: rgba(15, 23, 42, 0.8);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    width: 100%;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition-slow);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(0);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Messages */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin: 1.5rem 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
}

/* Checkout Section */
.checkout-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.6);
    border-radius: var(--radius);
    border: 1px solid rgba(59, 130, 246, 0.2);
    text-align: center;
}

.total-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 1rem 0;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-slow);
    padding: 1.5rem;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--dark);
    border-radius: var(--radius-xl);
    padding: 2rem;
    max-width: 600px;
    max-height: 90vh;
    overflow: auto;
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: var(--transition-slow);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-img {
    max-width: 100%;
    border-radius: var(--radius);
    display: block;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--light);
    font-size: 1.5rem;
    cursor: pointer;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Instructions Section */
.instructions {
    background: rgba(15, 23, 42, 0.6);
    padding: 3rem 0;
    margin-top: 3rem;
    border-radius: var(--radius-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.instructions-container {
    max-width: 900px;
    margin: 0 auto;
}

.instructions-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    background: linear-gradient(to right, var(--primary-light), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.steps {
    counter-reset: step-counter;
    list-style: none;
    display: grid;
    gap: 1.5rem;
}

.step {
    position: relative;
    padding: 1.5rem 1.5rem 1.5rem 5rem;
    background: rgba(30, 41, 59, 0.5);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

.step::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: var(--shadow-md);
}

.step ul {
    margin-top: 0.5rem;
    padding-left: 1.5rem;
}

.step li {
    margin-bottom: 0.25rem;
}

.highlight {
    color: var(--secondary);
    font-weight: 600;
}


/* Footer */
.footer {
    background: var(--dark);
    padding: 3rem 0;
    text-align: center;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-text {
    color: var(--gray);
    font-size: 0.95rem;
}

/* Sidebar Menu */
.sidebar-menu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background: var(--dark);
    z-index: 1000;
    transition: var(--transition-slow);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-menu.active {
    left: 0;
}

.sidebar-menu .logo {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    font-weight: 500;
}

.sidebar-menu a i {
    width: 1.5rem;
    text-align: center;
}

.sidebar-menu a:hover {
    color: var(--primary-light);
    padding-left: 0.5rem;
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Loading Spinner */
.spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    /* This rule is now redundant because of the mobile-first change,
       but it doesn't hurt to leave as a fallback for the 1024px breakpoint.
       The new `min-width: 1024px` rule will override it anyway. */
    .diamonds-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

@media (max-width: 768px) {
    .navbar {
        display: none;
    }
    
    .menu-toggle, .search-icon {
        display: flex;
    }
    
    .game-title {
        font-size: 2rem;
    }
       
    .main-grid {
        gap: 2rem;
    }
    
    .order-sidebar {
        padding: 1.5rem;
    }
    
    .section {
        padding: 2rem 0;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }
    
    .game-title {
        font-size: 1.75rem;
    }
    
    .game-meta {
        gap: 1rem;
    }
    
    .meta-item {
        font-size: 0.9rem;
    }

    /* All diamond card overrides are removed from here */
    
    .step {
        padding: 1.25rem 1rem 1.25rem 4rem;
    }
    
    .step::before {
        left: 1rem;
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .sidebar-menu {
        width: 280px;
        padding: 1.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }