/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --secondary: #0ea5e9;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --navbar-height: 64px;
}

body {
    background-color: var(--gray-50);
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--gray-800);
    line-height: 1.5;
    padding-top: var(--navbar-height);
}

/* Navbar Styles */
.navbar {
    background: white;
    height: var(--navbar-height);
    padding: 0 2rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--gray-200);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.logo i {
    font-size: 1.75rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--gray-600);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.nav-link:hover {
    color: var(--primary);
    background: var(--gray-50);
}

/* Request Container */
.request-container {
    max-width: 1280px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.request-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    border: 1px solid var(--gray-200);
}

.request-card h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.request-subtitle {
    color: var(--gray-500);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Specs Grid */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.spec-card {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--gray-200);
    transition: all 0.2s;
}

.spec-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.spec-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

/* OS Options */
.os-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.os-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: white;
}

.os-option:hover {
    border-color: #1a237e;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.os-option.active {
    border-color: #1a237e;
    background: #e8eaf6;
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.2);
}

.os-option.active::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 10px;
    color: #1a237e;
    font-size: 1.2rem;
    background: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.os-option img {
    width: 64px;
    height: 64px;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.os-option.active img {
    transform: scale(1.1);
}

.os-option span {
    font-weight: 600;
    color: #333;
    text-align: center;
}

.os-option.active span {
    color: #1a237e;
}

/* Slider Styles */
.slider-container {
    margin-bottom: 1rem;
}

.slider {
    width: 100%;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    margin: 1rem 0;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.slider-value {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

/* Preset Buttons */
.ram-presets, .cpu-presets, .storage-presets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
}

.ram-presets button, .cpu-presets button, .storage-presets button {
    background: white;
    border: 1px solid var(--gray-200);
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.ram-presets button:hover, .cpu-presets button:hover, .storage-presets button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.ram-presets button.selected, .cpu-presets button.selected, .storage-presets button.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Storage Specific Styles */
.storage-presets button {
    position: relative;
    overflow: hidden;
}

.storage-presets button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.storage-presets button:hover::after {
    transform: scaleX(1);
}

.storage-presets button.selected::after {
    transform: scaleX(1);
    background: white;
}

/* Storage Slider Specific Styles */
#storage.slider {
    background: linear-gradient(to right, var(--primary) 0%, var(--primary) 50%, var(--gray-200) 50%, var(--gray-200) 100%);
}

#storage.slider::-webkit-slider-thumb {
    background: var(--primary);
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--primary);
}

#storage.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 3px white, 0 0 0 5px var(--primary);
}

#storageValue {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Storage Card Animation */
.spec-card:nth-child(3) {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Storage Styles */
@media (max-width: 768px) {
    .storage-presets {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #storageValue {
        font-size: 1.25rem;
    }
}

/* Period Options */
.period-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
}

.period-option {
    background: white;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 2px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.period-option:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.period-option.selected {
    border-color: var(--primary);
    background: var(--gray-50);
}

.period-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.period-label {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Price Summary */
.price-summary {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--gray-200);
    margin-top: 2rem;
}

.price-details {
    margin-bottom: 1.5rem;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.price-item:last-child {
    border-bottom: none;
}

.price-item span:first-child {
    color: var(--gray-600);
    font-weight: 500;
}

.price-item span:last-child {
    font-weight: 600;
    color: var(--gray-900);
}

.price-item.total {
    font-size: 1.25rem;
    color: var(--primary);
    font-weight: 700;
}

.btn-large {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-large:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Error Message */
.error-message {
    background-color: #fee2e2;
    color: #991b1b;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    display: none; /* Hidden by default */
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #fecaca;
}

.error-message.show {
    display: flex; /* Show when has .show class */
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --navbar-height: 56px;
    }

    .navbar {
        padding: 0 1rem;
    }

    .request-container {
        padding: 1rem;
    }

    .request-card {
        padding: 1.5rem;
    }

    .request-card h2 {
        font-size: 1.5rem;
    }

    .specs-grid {
        grid-template-columns: 1fr;
    }

    .os-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .period-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .price-summary {
        padding: 1rem;
    }
}

/* Control Panel Options */
.control-panel-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.control-panel-option {
    background: white;
    padding: 1.25rem;
    border-radius: 0.75rem;
    border: 2px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.control-panel-option:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.control-panel-option.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.control-panel-option i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.control-panel-option.selected i {
    color: white;
}

.control-panel-option span {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.control-panel-option small {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    transition: all 0.3s ease;
}

.control-panel-option.selected small {
    color: rgba(255, 255, 255, 0.8);
}

.control-panel-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.control-panel-option:hover::before {
    transform: translateX(100%);
}

/* Control Panel Responsive Styles */
@media (max-width: 768px) {
    .control-panel-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .control-panel-option {
        padding: 1rem;
    }
    
    .control-panel-option i {
        font-size: 1.5rem;
    }
}

.selection-message {
    background: #1a237e;
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.2);
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-20px);
        opacity: 0;
    }
}

.login-alert {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.login-alert-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
}

.login-alert-content i {
    font-size: 3rem;
    color: #1a237e;
    margin-bottom: 1rem;
}

.login-alert-content h3 {
    color: #1a237e;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.login-alert-content p {
    color: #666;
    margin-bottom: 1.5rem;
}

.login-alert-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.login-alert-buttons .btn {
    min-width: 120px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
} 