/* 3D Studio Styles */

/* Studio Header */
.studio-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.studio-nav {
    display: flex;
    gap: 0.5rem;
}

.studio-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.5rem;
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.studio-nav-btn:hover {
    background: rgba(51, 65, 85, 0.5);
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.3);
}

.studio-nav-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.studio-nav-btn .icon {
    width: 20px;
    height: 20px;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
}

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

/* Viewer Container */
.viewer-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

@media (max-width: 1024px) {
    .viewer-container {
        grid-template-columns: 1fr;
    }
}

/* Viewer Controls */
.viewer-controls {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #475569 #1e293b;
}

.viewer-controls::-webkit-scrollbar {
    width: 6px;
}

.viewer-controls::-webkit-scrollbar-track {
    background: #1e293b;
}

.viewer-controls::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 3px;
}

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

.control-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #cbd5e1;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.select-input {
    width: 100%;
    padding: 0.5rem 1rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.5rem;
    color: #e2e8f0;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.select-input:hover,
.select-input:focus {
    background: rgba(51, 65, 85, 0.5);
    border-color: #2563eb;
    outline: none;
}

/* Color Options */
.color-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.color-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.color-btn:hover {
    transform: scale(1.1);
    border-color: #2563eb;
}

.color-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

#custom-color {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(148, 163, 184, 0.2);
    cursor: pointer;
    background: transparent;
}

/* Wheel Options */
.wheel-options,
.style-options,
.camera-presets {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.wheel-btn,
.style-btn,
.camera-btn {
    padding: 0.5rem 1rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.5rem;
    color: #94a3b8;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.wheel-btn:hover,
.style-btn:hover,
.camera-btn:hover {
    background: rgba(51, 65, 85, 0.5);
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.3);
}

.wheel-btn.active,
.style-btn.active,
.camera-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* Action Buttons */
.actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 2rem;
}

.primary-btn,
.secondary-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.primary-btn {
    background: #2563eb;
    color: white;
}

.primary-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.secondary-btn {
    background: rgba(51, 65, 85, 0.5);
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.secondary-btn:hover {
    background: rgba(71, 85, 105, 0.5);
    border-color: rgba(148, 163, 184, 0.3);
}

/* 3D Viewer */
.viewer-3d {
    position: relative;
    background: #0f172a;
    border-radius: 0.75rem;
    overflow: hidden;
    min-height: 600px;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

#three-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

#loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #94a3b8;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(148, 163, 184, 0.2);
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Card Generator */
.card-generator {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

@media (max-width: 1024px) {
    .card-generator {
        grid-template-columns: 1fr;
    }
}

.card-form {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #cbd5e1;
    font-size: 0.875rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem 1rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.5rem;
    color: #e2e8f0;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    background: rgba(51, 65, 85, 0.5);
    border-color: #2563eb;
    outline: none;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Awards Container */
#awards-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.award-input {
    display: flex;
    gap: 0.5rem;
}

.award-field {
    flex: 1;
    padding: 0.5rem 1rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.5rem;
    color: #e2e8f0;
    font-size: 0.875rem;
}

.remove-award {
    padding: 0.5rem 1rem;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 0.5rem;
    color: #fca5a5;
    cursor: pointer;
    transition: all 0.2s;
}

.remove-award:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
}

.add-btn {
    padding: 0.5rem 1rem;
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 0.5rem;
    color: #86efac;
    cursor: pointer;
    transition: all 0.2s;
}

.add-btn:hover {
    background: rgba(34, 197, 94, 0.3);
    border-color: rgba(34, 197, 94, 0.5);
}

/* Card Themes */
.card-themes {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.theme-btn {
    padding: 0.5rem 1rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.5rem;
    color: #94a3b8;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-btn:hover {
    background: rgba(51, 65, 85, 0.5);
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.3);
}

.theme-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* Card Preview */
.card-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.car-card {
    width: 400px;
    max-width: 100%;
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
}

.car-card.classic-theme {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #212529;
}

.car-card.modern-theme {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #e2e8f0;
}

.car-card.racing-theme {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
}

.car-card.vintage-theme {
    background: linear-gradient(135deg, #92400e 0%, #78350f 100%);
    color: #fef3c7;
}

.card-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.car-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: bold;
}

.owner-info {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.8;
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #0f172a;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.style-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    background: rgba(37, 99, 235, 0.9);
    color: white;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.card-specs {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

.spec-label {
    font-weight: 500;
    opacity: 0.7;
}

.spec-value {
    font-weight: 600;
}

.card-mods {
    padding: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.card-mods h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

#mods-list {
    margin: 0;
    padding-left: 1.5rem;
    font-size: 0.875rem;
}

.card-awards {
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.award-badge {
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #78350f;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.card-qr {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

#qr-code {
    width: 100px;
    height: 100px;
}

.qr-label {
    font-size: 0.875rem;
    opacity: 0.7;
}

.card-footer {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.05);
}

.garage-pass-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.card-id {
    font-size: 0.75rem;
    opacity: 0.7;
    font-family: monospace;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    max-width: 400px;
}

/* Gallery */
.gallery-container {
    padding: 1.5rem;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 0.75rem;
    margin-top: 1rem;
}

.gallery-container h2 {
    margin: 0 0 1.5rem;
    color: #e2e8f0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item .car-card {
    width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .studio-nav {
        flex-direction: column;
        width: 100%;
    }
    
    .studio-nav-btn {
        width: 100%;
        justify-content: center;
    }
    
    .viewer-container,
    .card-generator {
        grid-template-columns: 1fr;
    }
    
    .viewer-3d {
        min-height: 400px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    
    .car-card,
    .car-card * {
        visibility: visible;
    }
    
    .car-card {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        max-width: none;
    }
}

/* Notification Styles */
.notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    color: white;
    font-weight: 500;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.notification-success {
    background: #10b981;
}

.notification-error {
    background: #ef4444;
}

.notification-info {
    background: #3b82f6;
}
