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

:root {
    --bg-primary: #0a0a0c;
    --bg-secondary: #101014;
    --bg-card: #14141a;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.65);
    --text-muted: rgba(255, 255, 255, 0.45);
    
    --poland-red: #dc2626;
    --poland-red-light: #ef4444;
    --poland-red-dark: #b91c1c;
    --poland-white: #fafafa;
    --poland-cream: #f5f5f4;
    
    --accent-primary: var(--poland-red);
    --accent-secondary: var(--poland-red-light);
    --accent-glow: rgba(220, 38, 38, 0.4);
    
    --success: #22c55e;
    --error: #ef4444;
    
    --gradient-poland: linear-gradient(135deg, var(--poland-red) 0%, var(--poland-red-light) 100%);
    --gradient-dark: linear-gradient(180deg, rgb(20 20 26 / 0%) 0%, rgb(10 10 12 / 0%) 100%);
    --gradient-card: linear-gradient(145deg, rgba(30, 30, 38, 0.6) 0%, rgba(20, 20, 26, 0.8) 100%);
    
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 50px var(--accent-glow);
    --shadow-glow-lg: 0 0 80px var(--accent-glow);
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    background-image: url('../index/bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    overflow-x: hidden;
    position: relative;
}

.background-effects {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    background: rgb(10 10 12 / 64%);
}

.poland-stripe {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--poland-white) 0%, 
        var(--poland-white) 50%, 
        var(--poland-red) 50%, 
        var(--poland-red) 100%
    );
    opacity: 0.8;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
}

.glow-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--poland-red) 0%, transparent 70%);
    top: -150px;
    right: -100px;
    animation: float 18s ease-in-out infinite;
}

.glow-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    bottom: -100px;
    left: -80px;
    animation: float 22s ease-in-out infinite reverse;
}

.glow-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--poland-red-dark) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-glow 4s ease-in-out infinite;
    opacity: 0.2;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(20px, -25px) scale(1.03); }
    50% { transform: translate(-15px, 15px) scale(0.97); }
    75% { transform: translate(15px, 20px) scale(1.01); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.15; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.25; transform: translate(-50%, -50%) scale(1.1); }
}

.floating-particles span {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--poland-red);
    border-radius: 50%;
    opacity: 0;
    animation: particle 10s linear infinite;
}

.floating-particles span:nth-child(odd) {
    background: var(--poland-white);
}

.floating-particles span:nth-child(1) { left: 8%; animation-delay: 0s; }
.floating-particles span:nth-child(2) { left: 18%; animation-delay: 1.2s; }
.floating-particles span:nth-child(3) { left: 28%; animation-delay: 2.4s; }
.floating-particles span:nth-child(4) { left: 38%; animation-delay: 3.6s; }
.floating-particles span:nth-child(5) { left: 48%; animation-delay: 4.8s; }
.floating-particles span:nth-child(6) { left: 58%; animation-delay: 6s; }
.floating-particles span:nth-child(7) { left: 68%; animation-delay: 7.2s; }
.floating-particles span:nth-child(8) { left: 78%; animation-delay: 8.4s; }
.floating-particles span:nth-child(9) { left: 88%; animation-delay: 0.8s; }
.floating-particles span:nth-child(10) { left: 94%; animation-delay: 3s; }

@keyframes particle {
    0% { 
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% { opacity: 0.5; }
    90% { opacity: 0.5; }
    100% { 
        transform: translateY(-100vh) scale(1);
        opacity: 0;
    }
}

.main-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 540px;
    animation: fadeInUp 0.7s ease-out;
}

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

.form-wrapper {
    background: var(--gradient-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 44px;
    position: relative;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: var(--shadow-lg);
}

.form-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    padding: 1px;
    background: linear-gradient(
        145deg, 
        rgba(220, 38, 38, 0.4) 0%, 
        transparent 25%, 
        transparent 75%, 
        rgba(255, 255, 255, 0.1) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.25);
    border-radius: 100px;
    margin-bottom: 28px;
    animation: fadeInUp 0.7s ease-out 0.1s both;
}

.badge-flag {
    display: flex;
    width: 24px;
    height: 16px;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.flag-white {
    flex: 1;
    background: var(--poland-white);
}

.flag-red {
    flex: 1;
    background: var(--poland-red);
}

.badge-text {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--poland-red-light);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.form-header {
    margin-bottom: 32px;
    animation: fadeInUp 0.7s ease-out 0.15s both;
}

.title {
    margin-bottom: 16px;
}

.title-line {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.title-brand {
    display: block;
    font-size: 38px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.brand-trader {
    color: var(--text-secondary);
}

.ai-mark {
    background: var(--gradient-poland);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-left: 2px;
}

.subtitle {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 420px;
}

.stats-row {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    padding: 24px 0;
    margin-bottom: 28px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    animation: fadeInUp 0.7s ease-out 0.2s both;
}

.stat-item {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.stat-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 38, 38, 0.1);
    border-radius: 10px;
    margin-bottom: 4px;
}

.stat-icon svg {
    color: var(--poland-red);
}

.stat-value {
    display: block;
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 1px;
    background: var(--border-color);
    align-self: stretch;
    margin: 0 8px;
}

.visual-block {
    position: relative;
    margin-bottom: 32px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    animation: fadeInUp 0.7s ease-out 0.25s both;
}

.platform-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-lg);
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg, 
        transparent 0%, 
        transparent 60%, 
        rgba(10, 10, 12, 0.8) 100%
    );
    pointer-events: none;
}

.leadform {
    animation: fadeInUp 0.7s ease-out 0.3s both;
}

.form-inner {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 20px;
}

.input-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.input-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.input-wrapper:last-of-type {
    margin-bottom: 28px;
}

.input-group .input-wrapper {
    margin-bottom: 0;
}

.input-wrapper input {
    width: 100%;
    padding: 20px 18px 10px;
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    transition: all 0.25s ease;
}

.input-wrapper input::placeholder {
    color: transparent;
}

.input-wrapper label {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    pointer-events: none;
    transition: all 0.2s ease;
}

.input-wrapper input:focus,
.input-wrapper input:not(:placeholder-shown) {
    border-color: var(--poland-red);
    background: rgba(220, 38, 38, 0.04);
}

.input-wrapper input:focus + label,
.input-wrapper input:not(:placeholder-shown) + label {
    top: 14px;
    font-size: 10px;
    color: var(--poland-red-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-poland);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.input-wrapper input:focus ~ .input-border {
    width: 100%;
}

.error-msg {
    display: block;
    font-size: 12px;
    color: var(--error);
    margin-top: 8px;
    padding-left: 18px;
}

.phone-input .iti {
    width: 100%;
}

.submit-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 20px 36px;
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: var(--gradient-poland);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg, 
        rgba(255, 255, 255, 0.25) 0%, 
        transparent 50%, 
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-lg);
}

.submit-btn:hover::before {
    opacity: 1;
}

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

.btn-icon {
    display: flex;
    transition: transform 0.3s ease;
}

.submit-btn:hover .btn-icon {
    transform: translateX(5px);
}

.form-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.08) 0%, rgba(220, 38, 38, 0.03) 100%);
    border: 1px solid rgba(220, 38, 38, 0.15);
    border-radius: var(--radius-md);
    margin-bottom: 28px;
}

.notice-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 38, 38, 0.15);
    border-radius: 10px;
    flex-shrink: 0;
}

.notice-icon svg {
    color: var(--poland-red);
}

.notice-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notice-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.notice-text {
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.trust-indicators {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    animation: fadeInUp 0.7s ease-out 0.35s both;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.trust-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 8px;
}

.trust-icon svg {
    color: var(--success);
}

.trust-item span {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

.bottom-note {
    text-align: center;
    animation: fadeInUp 0.7s ease-out 0.4s both;
}

.bottom-note span {
    font-size: 13px;
    color: var(--text-muted);
}

.bottom-note strong {
    color: var(--poland-red-light);
    font-weight: 700;
}

.loader {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

.hide {
    display: none !important;
}

@media (max-width: 580px) {
    body {
        padding: 16px;
        align-items: flex-start;
        padding-top: 32px;
    }

    .form-wrapper {
        padding: 32px 24px;
    }

    .title-brand {
        font-size: 30px;
    }

    .stats-row {
        flex-direction: column;
        gap: 20px;
        padding: 20px 0;
    }

    .stat-divider {
        width: 80px;
        height: 1px;
    }

    .input-group {
        grid-template-columns: 1fr;
    }

    .input-group .input-wrapper {
        margin-bottom: 0;
    }

    .trust-indicators {
        flex-direction: column;
        align-items: center;
        gap: 14px;
    }

    .glow-1 {
        width: 280px;
        height: 280px;
        top: -80px;
        right: -40px;
    }

    .glow-2 {
        width: 220px;
        height: 220px;
        bottom: -60px;
        left: -40px;
    }

    .glow-3 {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 400px) {
    .form-wrapper {
        padding: 28px 18px;
    }

    .title-brand {
        font-size: 26px;
    }

    .badge {
        padding: 8px 14px;
    }

    .badge-text {
        font-size: 10px;
    }

    .stat-value {
        font-size: 16px;
    }

    .form-inner {
        padding: 22px 18px;
    }

    .submit-btn {
        padding: 18px 28px;
        font-size: 13px;
    }

    .preview-stats {
        grid-template-columns: 1fr;
    }
}