* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #1a1f2b;
    color: #ffffff;
    line-height: 1.6;
}

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

/* Navbar container overrides for corner positioning */
.navbar .container {
    max-width: 100%;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
}

/* Header Styles - Updated Layout */
.navbar {
    background: linear-gradient(135deg, #1a1f2b 0%, #252d3d 100%);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid #2d3748;
}

.nav-brand {
    flex-shrink: 0;
    order: 1;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #00d4ff;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: bold;
    transition: all 0.3s ease;
    padding: 6px 5px 6px 0;
    border-radius: 8px;
    white-space: nowrap;
}

.nav-brand a:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: translateY(-2px);
}

.nav-brand i {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 212, 255, 0.3));
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    margin-right: 0;
    order: 2;
    flex-wrap: wrap;
}

.nav-link {
    color: #e2e8f0;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
    letter-spacing: 0.025em;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    font-size: 1rem;
}

.nav-link:hover {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: #1a1f2b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
    border-color: #00d4ff;
}

.nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.cart-count {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #ffffff;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: bold;
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
    animation: pulse 2s infinite;
}

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

/* Special styling for auth buttons */
.nav-menu .btn {
    margin-left: 0.5rem;
    margin-right: 0;
    font-size: 0.9rem;
    padding: 8px 12px 8px 16px;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.nav-menu .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.nav-link.active {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: #1a1f2b;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    margin-left: 0.5rem;
}

.lang-btn {
    background: #252d3d;
    color: #00d4ff;
    border: 1px solid #00d4ff;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.95em;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.lang-btn.active,
.lang-btn:hover {
    background: #00d4ff;
    color: #1a1f2b;
}

/* Responsive Navbar for Mobile */
@media (max-width: 900px) {
    .navbar {
        padding: 0.5rem 0;
    }
    .navbar .container {
        flex-direction: column;
        align-items: stretch;
        padding: 0 5px;
    }
    .nav-brand {
        width: 100%;
        text-align: left;
        margin-bottom: 0.25rem;
    }
    .nav-menu {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        width: 100%;
        background: none;
        box-shadow: none;
        padding: 0.25rem 0 0.25rem 0;
        gap: 0.25rem;
        justify-content: flex-start;
    }
    .nav-link, .btn, .language-switcher {
        flex: 0 0 auto;
        min-width: 80px;
        margin: 0;
        padding: 0.5rem 0.6rem;
        border-radius: 6px;
        text-align: center;
        white-space: nowrap;
        font-size: 0.98rem;
    }
    .language-switcher {
        padding: 0;
        background: none;
        box-shadow: none;
        gap: 0.1rem;
    }
}

/* Make images and videos responsive */
img, video {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
}

/* Button Styles - FIXED FOR ALL BUTTONS */
.btn, button, input[type="submit"], input[type="button"] {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: #1a1f2b;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn:hover, button:hover, input[type="submit"]:hover, input[type="button"]:hover {
    background: linear-gradient(135deg, #0099cc, #007399);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.btn-primary {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: #1a1f2b;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0099cc, #007399);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #00d4ff;
    border: 2px solid #00d4ff;
}

.btn-outline:hover {
    background-color: #00d4ff;
    color: #1a1f2b;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Homepage Styles */
.hero {
    padding: 6rem 0;
    text-align: center;
    background: linear-gradient(135deg, #1a1f2b 0%, #2d3748 100%);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #00d4ff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #a0aec0;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Features Section */
.features {
    padding: 6rem 0;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #00d4ff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: #252d3d;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #2d3748;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #1a1f2b;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.feature-card p {
    color: #a0aec0;
    line-height: 1.6;
}

/* Store Page Styles */
.store-header {
    padding: 2rem 0;
    text-align: center;
}

.store-header h1 {
    font-size: 2.5rem;
    color: #00d4ff;
    margin-bottom: 1rem;
}

.category-filter {
    margin-bottom: 2rem;
    text-align: center;
}

.category-filter select {
    background-color: #252d3d;
    color: #ffffff;
    border: 1px solid #2d3748;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.product-card {
    background-color: #252d3d;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #2d3748;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    background-color: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.product-description {
    color: #a0aec0;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.product-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #00d4ff;
    margin-bottom: 1rem;
}

.product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stock-status {
    font-size: 0.85rem;
    color: #48bb78;
    font-weight: 500;
}

/* Build Tool Styles */
.build-tool {
    padding: 2rem 0;
}

.build-header {
    text-align: center;
    margin-bottom: 3rem;
}

.build-header h1 {
    font-size: 2.5rem;
    color: #00d4ff;
    margin-bottom: 1rem;
}

.build-subtitle {
    color: #a0aec0;
    font-size: 1.1rem;
}

.build-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.build-category {
    background-color: #252d3d;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid #2d3748;
}

.build-category h3 {
    color: #00d4ff;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* PC Builder Component Images - FIXED */
.component-image {
    width: 100%;
    height: 120px;
    background-color: #ffffff;
    border-radius: 6px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.component-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.component-name {
    color: #1a1f2b;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.component-price {
    color: #2d3748;
    font-weight: bold;
}

.selected-component {
    background-color: #f7fafc;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

/* PC Builder Buttons - FIXED */
.change-selection {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: #ffffff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.change-selection:hover {
    background: linear-gradient(135deg, #38a169, #2f855a);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

/* Select and Details buttons - FIXED */
button[onclick*="selectComponent"], 
.select-btn,
a[href*="Details"],
.details-btn {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: #1a1f2b;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin: 0 4px;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

button[onclick*="selectComponent"]:hover,
.select-btn:hover,
a[href*="Details"]:hover,
.details-btn:hover {
    background: linear-gradient(135deg, #0099cc, #007399);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

/* Auth Forms */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.auth-form {
    background-color: #252d3d;
    padding: 2rem;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    border: 1px solid #2d3748;
}

.auth-form h2 {
    text-align: center;
    color: #ffffff;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #a0aec0;
}

.form-group input {
    width: 100%;
    padding: 12px;
    background-color: #1a1f2b;
    border: 1px solid #2d3748;
    border-radius: 6px;
    color: #ffffff;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.auth-link {
    text-align: center;
    margin-top: 1rem;
    color: #a0aec0;
}

.auth-link a {
    color: #00d4ff;
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Profile Page */
.profile-container {
    padding: 2rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    text-align: center;
    margin-bottom: 3rem;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2.5rem;
    color: #1a1f2b;
    border: 3px solid #2d3748;
}

.profile-username {
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.profile-email {
    color: #a0aec0;
    font-size: 1.1rem;
}

.profile-section {
    background-color: #252d3d;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #2d3748;
}

.profile-section h3 {
    color: #00d4ff;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    background-color: #1a1f2b;
    padding: 1rem;
    border-radius: 8px;
}

.info-label {
    color: #a0aec0;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.info-value {
    color: #ffffff;
    font-weight: 600;
}

.settings-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.settings-btn {
    background-color: #1a1f2b;
    color: #ffffff;
    border: 1px solid #2d3748;
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.settings-btn:hover {
    background-color: #2d3748;
    border-color: #00d4ff;
    color: #00d4ff;
}

/* Cart Styles */
.cart-page {
    padding: 2rem 0;
}

.cart-page h1 {
    color: #00d4ff;
    margin-bottom: 2rem;
    text-align: center;
}

.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    background-color: #252d3d;
    border-radius: 12px;
    border: 1px solid #2d3748;
}

.empty-cart h2 {
    color: #ffffff;
    margin-bottom: 1rem;
}

.empty-cart p {
    color: #a0aec0;
    margin-bottom: 2rem;
}

.cart-items {
    background-color: #252d3d;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #2d3748;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #2d3748;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item img {
    width: 100px;
    height: 80px;
    object-fit: contain;
    background-color: #f7fafc;
    border-radius: 6px;
}

.item-info h3 {
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.item-info p {
    color: #a0aec0;
    font-size: 0.9rem;
}

.item-quantity input {
    width: 60px;
    padding: 8px;
    background-color: #1a1f2b;
    border: 1px solid #2d3748;
    border-radius: 4px;
    color: #ffffff;
    text-align: center;
}

.item-price {
    font-weight: bold;
    color: #00d4ff;
    font-size: 1.1rem;
}

.remove-btn {
    background-color: #f56565;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.remove-btn:hover {
    background-color: #e53e3e;
}

.cart-summary {
    background-color: #252d3d;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #2d3748;
}

.cart-summary h3 {
    color: #00d4ff;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Product Detail Styles */
.product-detail {
    padding: 2rem 0;
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.product-image-large {
    background-color: #f7fafc;
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-large img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.product-details h1 {
    color: #ffffff;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.product-category {
    color: #00d4ff;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.product-price-large {
    font-size: 2rem;
    font-weight: bold;
    color: #00d4ff;
    margin-bottom: 2rem;
}

.product-description {
    margin-bottom: 2rem;
}

.product-description h3 {
    color: #ffffff;
    margin-bottom: 1rem;
}

.product-description p {
    color: #a0aec0;
    line-height: 1.6;
}

.product-actions-large {
    background-color: #252d3d;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #2d3748;
}

.quantity-selector {
    margin-bottom: 1.5rem;
}

.quantity-selector label {
    display: block;
    color: #a0aec0;
    margin-bottom: 0.5rem;
}

.quantity-selector input {
    width: 80px;
    padding: 8px;
    background-color: #1a1f2b;
    border: 1px solid #2d3748;
    border-radius: 4px;
    color: #ffffff;
}

.product-actions-large .btn {
    width: 100%;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.stock-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #48bb78;
    font-size: 0.9rem;
}

/* Responsive Design for all components */
@media (max-width: 900px) {
    .container, .content, .main, .wrapper {
        padding: 0 5px !important;
        max-width: 100% !important;
    }
    .hero, .store-enhanced, .auth-container, .edit-profile-container, .builds-container, .success-container {
        padding: 1rem 0 !important;
    }
    .builds-grid, .store-grid, .product-list, .cart-items, .order-details, .dashboard-header, .admin-container {
        grid-template-columns: 1fr !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }
    .form-group input, .form-group select, .form-group textarea {
        font-size: 1em !important;
        padding: 12px !important;
    }
    h1 { font-size: 1.3em !important; }
    h2 { font-size: 1.1em !important; }
    h3 { font-size: 1em !important; }
    table, thead, tbody, th, td, tr {
        display: block !important;
        width: 100% !important;
    }
    th, td {
        text-align: left !important;
        padding: 8px 0 !important;
    }
    .cart-count, .score-circle, .success-icon {
        font-size: 1.2em !important;
    }
    .features-grid, .products-grid, .build-grid {
        grid-template-columns: 1fr !important;
    }
    .cart-item {
        grid-template-columns: 1fr !important;
        text-align: center !important;
        gap: 0.5rem !important;
    }
    .cart-item img {
        width: 80px !important;
        height: 60px !important;
        margin: 0 auto !important;
    }
    .product-grid {
        grid-template-columns: 1fr !important;
    }
}