/* Globe Contact Component - EXACT implementation from globe-contact.md */

/* Container */
.globe-contact-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    gap: 3rem;
}

/* Globe Demo Wrapper - EXACT from spec */
.globe-demo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 600px;
}

.globe-demo {
    position: relative;
    display: flex;
    width: 100%;
    max-width: 512px;
    height: 512px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
    padding: 2.5rem 10rem 10rem 10rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Globe Title - EXACT from spec */
.globe-title {
    pointer-events: none;
    white-space: pre-wrap;
    background: linear-gradient(to bottom, #ffffff 0%, rgba(156, 163, 175, 0.8) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    text-align: center;
    font-size: 8rem;
    font-weight: 600;
    line-height: 1;
    color: transparent;
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

/* Globe Container - EXACT positioning from spec */
.globe-container {
    position: absolute;
    inset: 0;
    margin: auto;
    aspect-ratio: 1/1;
    width: 100%;
    max-width: 600px;
    top: 7rem;
}

/* Globe Canvas */
.globe-canvas {
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    contain: layout paint size;
    cursor: grab;
}

.globe-canvas:active {
    cursor: grabbing;
}

.globe-canvas.loaded {
    opacity: 1;
}

/* Globe Overlay - EXACT from spec */
.globe-overlay {
    pointer-events: none;
    position: absolute;
    inset: 0;
    height: 100%;
    background: radial-gradient(circle at 50% 200%, rgba(0, 0, 0, 0.2), rgba(255, 255, 255, 0));
}

/* Contact Section */
.contact-section {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    width: 100%;
    max-width: 1200px;
    align-items: start;
}

/* Contact Form Container */
.contact-form-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    color: white;
}

.contact-form-container h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #ffffff, #e5e7eb);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.contact-form-container p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.form-group input,
.form-group select,
.form-group textarea {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: rgba(255, 255, 255, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group select option {
    background: #1f2937;
    color: white;
}

/* Submit Button */
.submit-button {
    position: relative;
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    border: none;
    border-radius: 8px;
    padding: 1rem 2rem;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

.submit-button:active {
    transform: translateY(0);
}

.button-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.submit-button:hover .button-glow {
    left: 100%;
}

/* Globe Controls */
.globe-controls {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    color: white;
    height: fit-content;
}

.globe-controls h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.control-group {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
}

.control-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
}

.control-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.control-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.control-group span {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 0.875rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    min-width: 40px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .contact-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .globe-controls {
        order: -1;
    }
}

@media (max-width: 768px) {
    .globe-contact-container {
        padding: 1rem;
        gap: 2rem;
    }
    
    .globe-demo {
        padding: 1rem 2rem 6rem 2rem;
        height: 400px;
    }
    
    .globe-title {
        font-size: 4rem;
        top: 1rem;
    }
    
    .globe-container {
        top: 4rem;
    }
    
    .contact-form-container {
        padding: 1.5rem;
    }
    
    .contact-form-container h2 {
        font-size: 1.5rem;
    }
    
    .globe-controls {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .globe-demo {
        padding: 0.5rem 1rem 4rem 1rem;
        height: 300px;
    }
    
    .globe-title {
        font-size: 3rem;
        top: 0.5rem;
    }
    
    .globe-container {
        top: 3rem;
    }
    
    .contact-form-container {
        padding: 1rem;
    }
    
    .submit-button {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* Loading Animation */
.globe-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    z-index: 3;
}

.globe-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

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

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .globe-title {
        background: linear-gradient(to bottom, #ffffff 0%, rgba(148, 163, 184, 0.1) 100%);
        -webkit-background-clip: text;
        background-clip: text;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .globe-canvas {
        transition: none;
    }
    
    .submit-button {
        transition: none;
    }
    
    .button-glow {
        transition: none;
    }
    
    .globe-loading::after {
        animation: none;
    }
}

/* Focus States */
.submit-button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.control-group input:focus {
    outline: 2px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}
