/* =====================================================
   RESET & GLOBAL STYLES
   ===================================================== */

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

:root {
    --primary-dark: #0f0f0f;
    --secondary-dark: #1a1a1a;
    --accent-red: #ff0000;
    --accent-red-light: #ff3333;
    --accent-white: #ffffff;
    --text-primary: #f0f0f0;
    --text-secondary: #b0b0b0;
    --glow-red: 0 0 20px rgba(255, 0, 0, 0.6);
    --glow-red-intense: 0 0 40px rgba(255, 0, 0, 0.8);
}

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1a0000 50%, var(--primary-dark) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* =====================================================
   ANIMATED BACKGROUND PARTICLES
   ===================================================== */

.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(255, 0, 0, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(255, 0, 0, 0.03) 0%, transparent 50%);
}

.particles-container::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(255, 0, 0, 0.3), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 0, 0, 0.2), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(255, 255, 255, 0.15), transparent);
    background-size: 200% 200%;
    background-repeat: repeat;
    animation: particleShift 20s ease-in-out infinite;
}

@keyframes particleShift {
    0%, 100% {
        background-position: 0% 0%;
        opacity: 0.5;
    }
    50% {
        background-position: 100% 100%;
        opacity: 0.8;
    }
}

/* =====================================================
   HERO SECTION
   ===================================================== */

.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(15, 15, 15, 0.9) 0%, rgba(26, 0, 0, 0.5) 100%);
    border-bottom: 2px solid rgba(255, 0, 0, 0.3);
    padding: 40px 20px;
}

.hero-content {
    text-align: center;
    animation: fadeInDown 1s ease-out;
}

.hero-title {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--accent-white);
    text-transform: uppercase;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    animation: glowPulse 3s ease-in-out infinite;
}

.hero-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-weight: 300;
    letter-spacing: 2px;
    color: var(--accent-red);
    margin-bottom: 40px;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.glow-underline {
    width: 200px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-red), transparent);
    margin: 0 auto;
    border-radius: 2px;
    box-shadow: var(--glow-red-intense);
    animation: glowFlash 2s ease-in-out infinite;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glowPulse {
    0%, 100% {
        text-shadow: 0 0 20px rgba(255, 0, 0, 0.5), 0 0 10px rgba(255, 0, 0, 0.3);
    }
    50% {
        text-shadow: 0 0 40px rgba(255, 0, 0, 0.8), 0 0 20px rgba(255, 0, 0, 0.5);
    }
}

@keyframes glowFlash {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 0, 0, 0.6);
        width: 200px;
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 0, 0, 0.8);
        width: 250px;
    }
}

/* =====================================================
   COMPONENTS SECTION
   ===================================================== */

.components-section {
    position: relative;
    z-index: 1;
    padding: 80px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent-white);
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.4);
}

.circuit-divider {
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-red), transparent);
    margin: 0 auto;
    box-shadow: var(--glow-red);
    position: relative;
}

.circuit-divider::before,
.circuit-divider::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--accent-red);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: var(--glow-red);
}

.circuit-divider::before {
    left: -15px;
}

.circuit-divider::after {
    right: -15px;
}

.components-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* =====================================================
   COMPONENT CARD STYLES
   ===================================================== */

.component-card {
    background: linear-gradient(135deg, var(--secondary-dark) 0%, rgba(40, 0, 0, 0.3) 100%);
    border: 1px solid rgba(255, 0, 0, 0.2);
    border-radius: 12px;
    padding: 25px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    transform: translateY(40px);
    position: relative;
}

.component-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-red), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.component-card:hover::before {
    opacity: 1;
}

.component-card.fade-in {
    animation: cardFadeIn 0.6s ease-out forwards;
}

.component-card:nth-child(1) { animation-delay: 0.1s; }
.component-card:nth-child(2) { animation-delay: 0.2s; }
.component-card:nth-child(3) { animation-delay: 0.3s; }
.component-card:nth-child(4) { animation-delay: 0.4s; }
.component-card:nth-child(5) { animation-delay: 0.5s; }
.component-card:nth-child(6) { animation-delay: 0.6s; }
.component-card:nth-child(7) { animation-delay: 0.7s; }
.component-card:nth-child(8) { animation-delay: 0.8s; }

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

.component-card:hover {
    border-color: var(--accent-red);
    box-shadow: 
        0 0 20px rgba(255, 0, 0, 0.4),
        inset 0 0 20px rgba(255, 0, 0, 0.1);
    transform: translateY(-10px) scale(1.02);
    background: linear-gradient(135deg, rgba(26, 0, 0, 0.5) 0%, rgba(50, 0, 0, 0.4) 100%);
}

.component-image-container {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 0, 0, 0.1);
    position: relative;
}

.component-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.component-card:hover .component-image {
    transform: scale(1.15) rotate(2deg);
    filter: brightness(1.2);
}



@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.component-info {
    padding: 0;
}

.component-name {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-white);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.component-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-red);
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.component-specs {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.amazon-button {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-light));
    color: var(--accent-white);
    border: none;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.amazon-button:hover {
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.7), inset 0 0 20px rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
    background: linear-gradient(135deg, var(--accent-red-light), var(--accent-red));
}

.amazon-button:active {
    transform: scale(0.98);
}

/* =====================================================
   BUILD SUMMARY SECTION
   ===================================================== */

.build-summary {
    position: relative;
    z-index: 1;
    padding: 60px 20px;
    background: linear-gradient(180deg, rgba(26, 0, 0, 0.3) 0%, rgba(15, 15, 15, 0.9) 100%);
    border-top: 2px solid rgba(255, 0, 0, 0.3);
    border-bottom: 2px solid rgba(255, 0, 0, 0.3);
}

.summary-content {
    max-width: 600px;
    margin: 0 auto;
}

.total-cost-card {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.1) 0%, rgba(26, 0, 0, 0.2) 100%);
    border: 2px solid rgba(255, 0, 0, 0.4);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.3);
    animation: cardFadeIn 0.8s ease-out;
}

.total-cost-card h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.total-amount {
    font-family: 'Orbitron', monospace;
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--accent-red);
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(255, 0, 0, 0.6);
}

.cost-breakdown {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 0, 0, 0.2);
}

.cost-item {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 10px 15px;
    background: rgba(255, 0, 0, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(255, 0, 0, 0.1);
}

/* =====================================================
   FOOTER SECTION
   ===================================================== */

.footer {
    position: relative;
    z-index: 1;
    padding: 40px 20px;
    background: linear-gradient(180deg, var(--primary-dark) 0%, rgba(0, 0, 0, 0.95) 100%);
    border-top: 1px solid rgba(255, 0, 0, 0.2);
    text-align: center;
}

.footer-content {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.footer-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    animation: fadeInUp 1s ease-out;
}

.footer-text .highlight {
    color: var(--accent-red);
    font-weight: 600;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.footer-glow {
    width: 150px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-red), transparent);
    margin: 20px auto 0;
    border-radius: 1px;
    box-shadow: var(--glow-red);
    animation: glowFlash 2s ease-in-out infinite;
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

@media (max-width: 768px) {
    .hero {
        min-height: 80vh;
        padding: 40px 20px;
    }

    .hero-title {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .components-section {
        padding: 60px 20px;
    }

    .components-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .total-amount {
        font-size: 2.5rem;
    }

    .cost-breakdown {
        flex-direction: column;
        gap: 10px;
    }

    .component-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 60vh;
        padding: 20px;
    }

    .hero-title {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .glow-underline {
        width: 150px;
    }

    .components-section {
        padding: 40px 15px;
    }

    .section-header h2 {
        font-size: 1.4rem;
    }

    .component-image-container {
        height: 180px;
        margin-bottom: 15px;
    }

    .component-name {
        font-size: 1rem;
    }

    .component-price {
        font-size: 1.5rem;
    }

    .total-cost-card {
        padding: 30px 20px;
    }

    .total-amount {
        font-size: 2rem;
    }

    .footer-text {
        font-size: 0.95rem;
    }
}

/* =====================================================
   SCROLLBAR STYLING
   ===================================================== */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--primary-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-red);
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.4);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-red-light);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.6);
}

/* =====================================================
   LOADING & ANIMATION STATES
   ===================================================== */

.loading {
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Selection styling */
::selection {
    background-color: var(--accent-red);
    color: var(--accent-white);
}

::-moz-selection {
    background-color: var(--accent-red);
    color: var(--accent-white);
}
