/* index.php: moved out of an inline <style> block, which needed style-src 'unsafe-inline'. */
:root {
    --primary: #0088ff;
    --primary-dark: #0066cc;
    --secondary: #1a1a1a;
    --background: #0a0a0a;
    --surface: #1a1a1a;
    --surface-light: #2a2a2a;
    --text: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --border: #333;
    --border-light: #444;
    --error: #ff4757;
    --warning: #ffa502;
    --success: #2ed573;
    --shadow: rgba(0, 0, 0, 0.3);
    --glow: rgba(0, 136, 255, 0.2);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animated background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    animation: gradientShift 20s ease infinite;
}

.background-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 25% 25%, var(--glow) 0%, transparent 50%),
                radial-gradient(circle at 75% 75%, rgba(0, 136, 255, 0.1) 0%, transparent 50%);
    animation: floatingOrbs 30s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%); }
    50% { background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%); }
}

@keyframes floatingOrbs {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(10px, -10px) scale(1.1); }
    66% { transform: translate(-10px, 10px) scale(0.9); }
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-top: 50px;
    margin-bottom: 3rem;
}

/* Interactive Heading Animations */
.interactive-heading {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    margin-bottom: 1rem;
    gap: 1rem;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.logo-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    justify-content: center;
    padding: 20px;
    border-radius: 20px;
    background: rgba(26, 26, 26, 0.3);
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.3),
        0 8px 15px rgba(0, 136, 255, 0.2),
        0 15px 30px rgba(0, 102, 204, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 136, 255, 0.2);
    transition: all 0.3s ease;
}

.interactive-heading:hover .logo-section {
    box-shadow:
        0 8px 12px rgba(0, 0, 0, 0.4),
        0 15px 25px rgba(0, 136, 255, 0.3),
        0 20px 40px rgba(0, 102, 204, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    border-color: rgba(0, 136, 255, 0.4);
}

.logo-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 50%;
    opacity: 0.75;
    box-shadow: 0 0 30px rgba(0, 136, 255, 0.6), 0 0 60px rgba(0, 102, 204, 0.4);
    transition: all 0.3s ease;
    animation: logoFloat 3s ease-in-out infinite;
}

.logo-image:hover {
    transform: scale(1.1);
    box-shadow: 0 0 40px rgba(0, 136, 255, 0.8), 0 0 80px rgba(0, 102, 204, 0.6);
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.main-heading {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), #0099ff, #6699ff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: gradientShift 4s ease-in-out infinite;
    position: relative;
    overflow: visible;
}

/* 3D Depth Layers - Multiple shadows behind text */
.main-heading::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    z-index: -2;
    color: rgba(0, 60, 140, 0.8);
    text-shadow:
        0.5px 0.5px 0 rgba(0, 55, 130, 0.95),
        1px 1px 0 rgba(0, 50, 120, 0.9),
        1.5px 1.5px 0 rgba(0, 45, 110, 0.85),
        2px 2px 0 rgba(0, 40, 100, 0.8),
        2.5px 2.5px 0 rgba(0, 35, 90, 0.75),
        3px 3px 0 rgba(0, 30, 80, 0.7),
        3.5px 3.5px 0 rgba(0, 28, 75, 0.65),
        4px 4px 0 rgba(0, 25, 70, 0.6),
        4.5px 4.5px 0 rgba(0, 22, 65, 0.55),
        5px 5px 0 rgba(0, 20, 60, 0.5),
        5.5px 5.5px 0 rgba(0, 18, 55, 0.45),
        6px 6px 0 rgba(0, 15, 50, 0.4),
        6.5px 6.5px 0 rgba(0, 12, 45, 0.35),
        7px 7px 2px rgba(0, 10, 40, 0.5),
        7.5px 7.5px 5px rgba(0, 8, 30, 0.4),
        8px 8px 8px rgba(0, 5, 20, 0.3),
        -0.5px -0.5px 0 rgba(100, 150, 255, 0.15);
    pointer-events: none;
}

/* Glow layer behind 3D depth */
.main-heading::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    z-index: -3;
    background: linear-gradient(135deg, rgba(0, 50, 120, 0.7), rgba(0, 35, 90, 0.6), rgba(0, 20, 60, 0.5));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(20px) brightness(1.5);
    opacity: 0.6;
}

.sub-heading {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0.5rem 0 0 0;
    opacity: 0.8;
    transition: all 0.3s ease;
    position: relative;
}

.sub-heading::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), #0099ff);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.interactive-heading:hover .main-heading {
    transform: scale(1.05) rotateX(5deg) translateZ(20px);
}

.interactive-heading:hover .main-heading::before {
    color: rgba(0, 70, 150, 0.9);
    text-shadow:
        1px 1px 0 rgba(0, 60, 140, 1),
        2px 2px 0 rgba(0, 55, 130, 0.95),
        3px 3px 0 rgba(0, 50, 120, 0.9),
        4px 4px 0 rgba(0, 45, 110, 0.85),
        5px 5px 0 rgba(0, 40, 100, 0.8),
        6px 6px 0 rgba(0, 35, 90, 0.75),
        7px 7px 0 rgba(0, 30, 80, 0.7),
        8px 8px 0 rgba(0, 25, 70, 0.65),
        9px 9px 0 rgba(0, 20, 60, 0.6),
        10px 10px 0 rgba(0, 18, 55, 0.55),
        11px 11px 2px rgba(0, 15, 50, 0.5),
        12px 12px 5px rgba(0, 12, 45, 0.45),
        13px 13px 8px rgba(0, 10, 40, 0.4),
        14px 14px 12px rgba(0, 8, 30, 0.35),
        -1px -1px 0 rgba(120, 180, 255, 0.25),
        -0.5px -0.5px 2px rgba(150, 200, 255, 0.3);
}

.interactive-heading:hover .main-heading::after {
    background: linear-gradient(135deg, rgba(0, 60, 140, 0.85), rgba(0, 45, 110, 0.75), rgba(0, 30, 80, 0.65));
    filter: blur(30px) brightness(1.9);
    opacity: 0.75;
}

.interactive-heading:hover .sub-heading {
    color: var(--primary);
    opacity: 1;
    transform: translateY(-2px);
}

.interactive-heading:hover .sub-heading::after {
    width: 100%;
}

.interactive-heading.clicked .main-heading {
    animation: headingPulse 0.6s ease-out;
}

.interactive-heading.clicked .sub-heading {
    animation: subHeadingBounce 0.8s ease-out;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes headingPulse {
    0% { transform: scale(1.05) rotateX(5deg); }
    30% { transform: scale(1.15) rotateX(10deg) rotateY(5deg); }
    60% { transform: scale(0.95) rotateX(-5deg) rotateY(-2deg); }
    100% { transform: scale(1.05) rotateX(5deg); }
}

@keyframes subHeadingBounce {
    0% { transform: translateY(-2px); }
    25% { transform: translateY(-8px) scale(1.1); }
    50% { transform: translateY(2px) scale(0.95); }
    75% { transform: translateY(-4px) scale(1.05); }
    100% { transform: translateY(-2px); }
}

.description {
    animation: fadeInUp 1s ease-out 0.5s both;
}

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

.header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    background: var(--surface);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px var(--shadow);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.contact-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #0099ff, var(--primary));
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

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

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

.required {
    color: var(--error);
}

input, textarea, select {
    width: 100%;
    padding: 1rem;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--glow);
    transform: translateY(-2px);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.validation-message {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.validation-message.show {
    opacity: 1;
    transform: translateY(0);
}

.validation-message.error {
    color: var(--error);
}

.validation-message.success {
    color: var(--success);
}

.human-verification {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--surface-light);
    border-radius: 15px;
    border: 1px solid var(--border);
    text-align: center;
}

.verification-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.verification-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--border);
    transition: all 0.3s ease;
    position: relative;
}

.verification-indicator.validating {
    background: var(--warning);
    animation: pulse 2s ease-in-out infinite;
}

.verification-indicator.success {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.verification-indicator.error {
    background: var(--error);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

.submit-btn {
    width: 100%;
    padding: 1.2rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--background);
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    opacity: 0.6;
    pointer-events: none;
}

.submit-btn.enabled {
    opacity: 1;
    pointer-events: auto;
}

.submit-btn:hover.enabled {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px var(--glow);
}

.submit-btn:active {
    transform: translateY(-1px);
}

.submit-btn.loading {
    color: transparent;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 3px solid transparent;
    border-top: 3px solid var(--background);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.success-message, .error-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 10px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.success-message {
    background: rgba(46, 213, 115, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.error-message {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
}

.success-message.show, .error-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .logo-section {
        flex-direction: column;
        gap: 15px;
    }

    .logo-image {
        width: 80px;
        height: 80px;
    }

    .main-heading {
        font-size: 2.5rem;
    }

    .sub-heading {
        font-size: 1.2rem;
    }

    /* Reduce animation intensity on mobile for performance */
    .interactive-heading:hover .main-heading {
        transform: scale(1.02) rotateX(2deg);
    }

    .main-heading::before {
        display: none; /* Disable shine effect on mobile for performance */
    }

    .contact-form {
        padding: 1.5rem;
    }

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

/* Loading states */
.form-group.loading input,
.form-group.loading textarea,
.form-group.loading select {
    background: linear-gradient(90deg, var(--surface-light) 25%, var(--border) 50%, var(--surface-light) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

.copyright {
    font-size: 0.9rem;
    opacity: 0.7;
    animation: fadeInUp 1s ease-out 1s both;
}

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

/* Classes for what contact-form-v2.js used to write as inline style attributes
   (refused by the page's CSP, which allows no 'unsafe-inline'). */
.verification-highlight {
    color: var(--primary);
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 248, 200, 0.5);
}

.verification-count {
    color: var(--primary);
}

.verification-analyzing {
    color: var(--warning);
    font-weight: bold;
}


/* Heading effects: the page script injected these as a <style> element at
   runtime, which the CSP (no 'unsafe-inline') refuses. */
@keyframes rippleExpand {
    0% { width: 0; height: 0; opacity: 0.5; }
    100% { width: 200px; height: 200px; opacity: 0; }
}

@keyframes particleBurst {
    0% {
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(-1 * var(--distance))) scale(0);
        opacity: 0;
    }
}

.interactive-heading::after {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border: 1px solid rgba(0, 136, 255, 0.1);
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.interactive-heading:hover::after {
    opacity: 1;
    animation: borderGlow 2s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { border-color: rgba(0, 136, 255, 0.1); }
    50% { border-color: rgba(0, 136, 255, 0.5); }
}

/* Sparkle animation, injected the same way. */
@keyframes sparkle {
    0% { opacity: 0; transform: scale(0) rotate(0deg); }
    50% { opacity: 1; transform: scale(1) rotate(180deg); }
    100% { opacity: 0; transform: scale(0) rotate(360deg); }
}

/* Floating response panel (js/floating-response-panel.js): injected as a
   <style> element at runtime until the CSP stopped allowing that. */
.floating-response-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floating-response-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.floating-response-panel {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    max-width: 450px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.floating-response-overlay.visible .floating-response-panel {
    transform: scale(1) translateY(0);
}

.panel-header {
    display: flex;
    justify-content: flex-end;
    padding: 16px 20px 0 20px;
}

.close-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    color: #64748b;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-button:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: scale(1.1);
}

.close-button:active {
    transform: scale(0.95);
}

.panel-content {
    padding: 0 32px 32px 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.panel-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    position: relative;
    animation: panelIconPulse 2s ease-in-out infinite;
}

.panel-icon.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.panel-icon.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

.panel-icon.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.panel-icon.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
}

.panel-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 24px;
}

.panel-icon.success::before {
    content: '✓';
}

.panel-icon.error::before {
    content: '✕';
}

.panel-icon.info::before {
    content: 'ℹ';
}

.panel-icon.warning::before {
    content: '⚠';
}

.panel-message {
    font-size: 18px;
    line-height: 1.6;
    color: #1f2937;
    font-weight: 500;
    max-width: 100%;
    word-wrap: break-word;
}

@keyframes panelIconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .floating-response-panel {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .panel-message {
        color: #f9fafb;
    }

    .close-button {
        color: #9ca3af;
    }

    .close-button:hover {
        color: #ef4444;
    }
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .floating-response-panel {
        width: 95%;
        margin: 0 2.5%;
    }

    .panel-content {
        padding: 0 24px 24px 24px;
        gap: 16px;
    }

    .panel-icon {
        width: 56px;
        height: 56px;
        font-size: 28px;
    }

    .panel-message {
        font-size: 16px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .floating-response-overlay,
    .floating-response-panel,
    .close-button,
    .panel-icon {
        transition: none;
        animation: none;
    }
}
