:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --success-color: #10b981;
    --success-bg: #d1fae5;
    --success-text: #047857;
    --error-color: #ef4444;
    --error-bg: #fee2e2;
    --error-text: #dc2626;
    --warning-color: #f59e0b;
    --warning-bg: #fef3c7;
    --warning-text: #d97706;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --bg-gradient-start: #667eea;
    --bg-gradient-end: #764ba2;
    --bg-light: #f3f4f6;
    --bg-white: #ffffff;
    --border-color: #d1d5db;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --bg-gradient-start: #1e293b;
    --bg-gradient-end: #0f172a;
    --bg-light: #1f2937;
    --bg-white: #111827;
    --border-color: #374151;
    --glass-bg: rgba(17, 24, 39, 0.8);
    --glass-border: rgba(75, 85, 99, 0.3);
    --success-bg: rgba(16, 185, 129, 0.15);
    --success-text: #34d399;
    --error-bg: rgba(239, 68, 68, 0.15);
    --error-text: #f87171;
    --warning-bg: rgba(245, 158, 11, 0.15);
    --warning-text: #fbbf24;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 10px 15px;
    position: relative;
    overflow-x: hidden;
    transition: var(--transition);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(138, 75, 175, 0.3), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: var(--shadow-xl);
}

.theme-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    color: var(--text-primary);
    transition: var(--transition);
}

.sun-icon {
    display: none;
}

.moon-icon {
    display: block;
}

[data-theme="dark"] .sun-icon {
    display: block;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 20px;
    animation: fadeInDown 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.header-logo {
    width: 110px;
    height: 110px;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
    transition: var(--transition);
}

.header-logo:hover {
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.4));
    transform: scale(1.05);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

.header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-weight: 700;
    background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.95;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 15px;
}

.header-stats {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.stat-badge {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: var(--transition);
    color: #1f2937;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .stat-badge {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
    box-shadow: var(--shadow-md);
}

.stat-badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .stat-badge:hover {
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 1.2rem;
}

.message-area {
    margin-bottom: 15px;
}

.message {
    padding: 16px 20px;
    border-radius: 14px;
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideInDown 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid transparent;
    transition: var(--transition);
}

.message:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.message-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.message-content {
    flex: 1;
}

.message-title {
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.message-text {
    font-size: 0.95rem;
    line-height: 1.5;
}

.message.success {
    background: var(--success-bg);
    color: var(--success-text);
    border-left: 4px solid var(--success-color);
}

.message.success .message-title {
    color: var(--success-color);
}

.message.error {
    background: var(--error-bg);
    color: var(--error-text);
    border-left: 4px solid var(--error-color);
}

.message.error .message-title {
    color: var(--error-color);
}

.message.info {
    background: var(--warning-bg);
    color: var(--warning-text);
    border-left: 4px solid var(--warning-color);
}

.message.info .message-title {
    color: var(--warning-color);
}

.claim-section {
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.claim-card {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 24px 32px;
    box-shadow: var(--shadow-xl);
    max-width: 580px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.claim-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
    animation: rotateGradient 15s linear infinite;
    pointer-events: none;
}

@keyframes rotateGradient {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

.card-header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.card-header h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 8px;
    font-weight: 800;
}

.form-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group {
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.label-icon {
    font-size: 1.2rem;
}

.label-required {
    color: var(--error-color);
    font-size: 1.2rem;
}

.input-wrapper {
    position: relative;
}

.form-group input {
    width: 100%;
    padding: 12px 44px 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--bg-white);
    color: var(--text-primary);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.form-group input.error {
    border-color: var(--error-color);
}

.form-group input.success {
    border-color: var(--success-color);
}

.input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    stroke-width: 2;
    transition: var(--transition);
    pointer-events: none;
}

.form-group input:focus + .input-icon {
    color: var(--primary-color);
}

.form-hint {
    display: block;
    margin-top: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-error {
    display: block;
    margin-top: 8px;
    font-size: 0.875rem;
    color: var(--error-color);
    font-weight: 500;
    min-height: 20px;
}

.captcha-group {
    margin-bottom: 18px;
}

.captcha-wrapper {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 75px;
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.cf-turnstile {
    margin: 0 auto;
}

.btn-primary {
    width: 100%;
    padding: 13px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.6;
}

.button-content {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.button-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.button-spinner {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.spinner-small {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.form-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.conversion-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
}

.conversion-info svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.footer {
    text-align: center;
    color: white;
    margin-top: 25px;
    padding: 20px 15px;
    opacity: 0.95;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-section p {
    margin: 5px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.footer-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
}

.footer-copyright {
    margin-top: 15px;
    font-size: 0.95rem;
    opacity: 0.95;
}

.vertex-link {
    color: white;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    transition: var(--transition);
    margin-left: 6px;
    color: #1f2937;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .vertex-link {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
}

.vertex-link:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    background: rgba(99, 102, 241, 0.9);
    color: white;
}

[data-theme="dark"] .vertex-link:hover {
    background: rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.5);
}

.vertex-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    animation: pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.footer-badges {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.badge {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 0.8rem;
    font-weight: 700;
    transition: var(--transition);
    color: #1f2937;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .badge {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
    box-shadow: none;
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .badge:hover {
    box-shadow: var(--shadow-md);
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .theme-toggle {
        width: 44px;
        height: 44px;
        top: 15px;
        right: 15px;
    }

    .theme-icon {
        width: 20px;
        height: 20px;
    }

    .header-icon {
        font-size: 3rem;
    }

    .header-logo {
        width: 95px;
        height: 95px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .header-stats {
        gap: 10px;
    }

    .stat-badge {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .claim-card {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .card-header {
        margin-bottom: 24px;
    }

    .card-header h2 {
        font-size: 1.5rem;
    }

    .form-description {
        font-size: 0.9rem;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .btn-primary {
        padding: 14px 20px;
        font-size: 1rem;
    }

    .footer {
        margin-top: 40px;
        padding: 20px 10px;
    }
}

@media (max-width: 480px) {
    .header-icon {
        font-size: 2.5rem;
    }

    .header-logo {
        width: 90px;
        height: 90px;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .claim-card {
        padding: 20px 16px;
        border-radius: 16px;
    }

    .card-header {
        margin-bottom: 20px;
    }

    .card-header h2 {
        font-size: 1.4rem;
    }

    .form-group input {
        padding: 12px 40px 12px 14px;
    }

    .cf-turnstile {
        transform: scale(0.9);
        transform-origin: center;
    }

    .btn-primary {
        font-size: 0.95rem;
    }

    .footer-badges {
        gap: 8px;
    }

    .badge {
        padding: 5px 11px;
        font-size: 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
