/* iPhone Pre-order Form - Premium Styling */

/* Import IBM Plex Sans Arabic */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

/* Apple Icon Font Awesome */
.apple-icon {
    display: inline-block;
    margin-left: 0.25rem;
    margin-right: 0.25rem;
    vertical-align: middle;
    color: #ffffff;
}

:root {
    --lg-primary: #007aff;
    --lg-secondary: #5856d6;
    --lg-success: #34c759;
    --lg-warning: #ff9500;
    --lg-danger: #ff3b30;
    --lg-dark: #1c1c1e;
    --lg-light: #f2f2f7;
    --lg-glass-bg: rgba(255, 255, 255, 0.1);
    --lg-glass-border: rgba(255, 255, 255, 0.2);
    --lg-blur-ultra: blur(20px);
    --lg-blur-heavy: blur(15px);
    --lg-blur-medium: blur(10px);
    --lg-blur-light: blur(5px);
}

/* Base Styles */
#iphone-preorder-form-container * {
    box-sizing: border-box;
}

#iphone-preorder-form-container {
    font-family: 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #000;
    color: #fff;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

.lg-dark {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    text-align: center;
    color: #fff;
}

.loading-text {
    margin-top: 1rem;
    font-size: 1.1rem;
}

/* YouTube Video Background */
.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: #000;
}

.video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw;
    min-height: 100vh;
    min-width: 177.77vh;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0.4;
}

.video-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1;
}

/* Main Content */
.preorder-app {
    min-height: 100vh;
    padding-top: 2rem;
    position: relative;
    z-index: 2;
}

.backdrop-blur {
    backdrop-filter: var(--lg-blur-ultra);
    -webkit-backdrop-filter: var(--lg-blur-ultra);
}

.preorder-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Typography */
.lg-heading-display {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.text-gradient {
    background: linear-gradient(135deg, #007aff 0%, #5856d6 50%, #ff9500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lg-heading-section {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: #fff !important;
}

/* Configuration Steps */
.config-step {
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

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

/* Selection Cards */
.selection-card {
    background: var(--lg-glass-bg);
    border: 1px solid var(--lg-glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: var(--lg-blur-medium);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.selection-card:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.selection-card.selected {
    background: rgba(0, 122, 255, 0.2);
    border-color: #007aff;
    box-shadow: 0 0 20px rgba(0, 122, 255, 0.3);
}

.selection-content h5 {
    margin: 0;
    font-weight: 600;
    color: #fff;
}

/* Color Options */
.color-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.color-option {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: #007aff;
    box-shadow: 0 0 20px rgba(0, 122, 255, 0.5);
}

.color-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Storage Cards */
.storage-card {
    min-height: 80px !important;
}

/* Glass Effects */
.lg-glass {
    background: var(--lg-glass-bg);
    border: 1px solid var(--lg-glass-border);
    backdrop-filter: var(--lg-blur-medium);
    -webkit-backdrop-filter: var(--lg-blur-medium);
}

.lg-card {
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Summary Section */
.preorder-right-column {
    position: relative;
}

.summary-fixed {
    position: sticky;
    top: 120px;
}

.summary-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.device-preview {
    text-align: center;
    margin-bottom: 2rem;
}

.device-image {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 1rem;
}

.device-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
}

.config-summary .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    color: #fff;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.summary-item .label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.summary-item .value {
    font-weight: 600;
    color: #fff;
}

/* Buttons */
.btn-lgx {
    background: var(--lg-glass-bg);
    border: 1px solid var(--lg-glass-border);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    backdrop-filter: var(--lg-blur-light);
    cursor: pointer;
}

.btn-lgx:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    transform: translateY(-1px);
}

.btn-lgx:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-lgx.lg-glass {
    background: rgba(0, 122, 255, 0.2);
    border-color: #007aff;
}

.btn-lgx.lg-glass:hover:not(:disabled) {
    background: rgba(0, 122, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.3);
}

.reserve-btn {
    font-size: 1.1rem;
    padding: 1rem 1.5rem;
}

/* Modal Styles */
.lg-modal {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    backdrop-filter: var(--lg-blur-heavy);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.btn-close-white {
    filter: invert(1);
}

/* Form Inputs */
.lg-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.lg-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #007aff;
    box-shadow: 0 0 0 0.2rem rgba(0, 122, 255, 0.25);
    color: #fff;
}

.lg-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-label {
    color: #fff;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lg-heading-display {
        font-size: 2.5rem;
    }
    
    .preorder-main {
        padding: 1rem;
    }
    
    .summary-fixed {
        position: relative;
        top: auto;
        margin-top: 2rem;
    }
    
    .device-image {
        width: 150px;
        height: 150px;
    }
    
    .color-option {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 576px) {
    .lg-heading-display {
        font-size: 2rem;
    }
    
    .selection-card {
        padding: 1rem;
        min-height: 80px;
    }
    
    .lg-card {
        padding: 1.5rem;
    }
}
