/* ============================================
   justdoit.com.tr - Domain Offer Form
   Premium Dark Theme with Glassmorphism
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    --bg-primary: #06060b;
    --bg-card: rgba(15, 15, 25, 0.75);
    --bg-card-border: rgba(99, 102, 241, 0.15);
    --bg-input: rgba(20, 20, 35, 0.8);
    --bg-input-focus: rgba(30, 30, 50, 0.9);

    --text-primary: #f0f0f5;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --text-accent: #a78bfa;

    --accent-start: #6366f1;
    --accent-end: #a855f7;
    --accent-hover-start: #7c7ff7;
    --accent-hover-end: #b76ef9;

    --error: #f43f5e;
    --success: #10b981;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;

    --shadow-card: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 120px rgba(99, 102, 241, 0.06);
    --shadow-input: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-button: 0 8px 30px rgba(99, 102, 241, 0.35);

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

/* ---------- Background Effects ---------- */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(168, 85, 247, 0.06) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 50%, rgba(99, 102, 241, 0.03) 0%, transparent 70%);
    animation: bgShift 20s ease-in-out infinite alternate;
    z-index: 0;
    pointer-events: none;
}

@keyframes bgShift {
    0% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(2%, -2%) rotate(1deg); }
    66% { transform: translate(-1%, 1%) rotate(-0.5deg); }
    100% { transform: translate(1%, -1%) rotate(0.5deg); }
}

.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    animation: particleFloat linear infinite;
}

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

/* ---------- Container & Card ---------- */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card {
    width: 100%;
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-xl);
    padding: 40px 36px;
    position: relative;
    overflow: hidden;
    animation: cardEnter 0.8s var(--transition-medium) both;
    box-shadow: var(--shadow-card);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.4), rgba(168, 85, 247, 0.4), transparent);
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ---------- Brand / Header ---------- */
.brand {
    text-align: center;
    margin-bottom: 36px;
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    animation: iconPulse 3s ease-in-out infinite;
}

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

.brand-name {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.brand-tld {
    font-weight: 500;
    opacity: 0.7;
}

.brand-tagline {
    margin-top: 0;
    color: var(--text-secondary);
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------- Form ---------- */
.form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    animation: fieldEnter 0.5s ease both;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.15s; }
.form-group:nth-child(3) { animation-delay: 0.2s; }
.form-group:nth-child(4) { animation-delay: 0.25s; }
.form-group:nth-child(5) { animation-delay: 0.3s; }
.form-group:nth-child(6) { animation-delay: 0.35s; }

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

/* ---------- Labels ---------- */
label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 0.03em;
}

.field-icon {
    width: 16px;
    height: 16px;
    color: var(--text-accent);
    flex-shrink: 0;
}

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

.optional {
    color: var(--text-muted);
    font-weight: 400;
    text-transform: none;
    font-size: 0.78rem;
}

/* ---------- Inputs & Textarea ---------- */
input,
textarea,
select {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1.5px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    outline: none;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-input);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

input:hover,
textarea:hover,
select:hover {
    border-color: rgba(99, 102, 241, 0.25);
}

input:focus,
textarea:focus,
select:focus {
    background: var(--bg-input-focus);
    border-color: var(--accent-start);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15), var(--shadow-input);
}

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

/* ---------- Phone Wrapper ---------- */
.phone-wrapper {
    display: flex;
    gap: 10px;
}

.country-select {
    width: 120px;
    flex-shrink: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%239ca3af' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 30px;
}

.phone-wrapper input {
    flex: 1;
}

/* ---------- Offer Wrapper ---------- */
.offer-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 16px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-accent);
    z-index: 1;
    pointer-events: none;
}

.offer-wrapper input {
    width: 100%;
    padding-left: 36px;
}

/* Remove number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* ---------- Validation States ---------- */
.error-msg {
    font-size: 0.78rem;
    color: var(--error);
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all var(--transition-fast);
    padding-left: 2px;
}

.form-group.has-error .error-msg {
    opacity: 1;
    max-height: 24px;
    margin-top: 2px;
}

.form-group.has-error input,
.form-group.has-error textarea,
.form-group.has-error select {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.12);
}

.form-group.is-valid input,
.form-group.is-valid textarea,
.form-group.is-valid select {
    border-color: var(--success);
}

/* ---------- Submit Button ---------- */
.submit-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    margin-top: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    overflow: hidden;
    transition: all var(--transition-medium);
    box-shadow: var(--shadow-button);
    animation: fieldEnter 0.5s ease 0.4s both;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.6s ease;
}

.submit-btn:hover {
    background: linear-gradient(135deg, var(--accent-hover-start), var(--accent-hover-end));
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.45);
    transform: translateY(-2px);
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-button);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-fast);
}

.submit-btn:hover .btn-icon {
    transform: translate(3px, -3px);
}

.btn-loader {
    display: none;
}

.submit-btn.loading .btn-text {
    opacity: 0;
}

.submit-btn.loading .btn-icon {
    display: none;
}

.submit-btn.loading .btn-loader {
    display: flex;
    position: absolute;
}

.spinner {
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

/* ---------- Toast Messages ---------- */
.toast {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 500;
    margin-top: 20px;
    animation: toastIn 0.4s ease;
}

.toast svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.toast-success.show {
    display: flex;
}

.toast-error {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: var(--error);
}

.toast-error.show {
    display: flex;
}

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

/* ---------- Footer ---------- */
.footer {
    text-align: center;
    margin-top: 28px;
    padding: 0 16px;
}

.footer p {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

/* ---------- Responsive ---------- */

/* Tablet & small desktop */
@media (max-width: 600px) {
    body {
        align-items: flex-start;
    }

    .container {
        padding: 20px 12px;
        padding-top: env(safe-area-inset-top, 20px);
        padding-bottom: env(safe-area-inset-bottom, 20px);
    }

    .card {
        padding: 28px 22px;
        border-radius: var(--radius-lg);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    }

    .brand {
        margin-bottom: 28px;
    }

    .brand-tagline {
        font-size: 1.05rem;
    }

    .form {
        gap: 18px;
    }

    label {
        font-size: 0.78rem;
    }

    input,
    textarea,
    select {
        font-size: 16px; /* Prevents iOS auto-zoom on focus */
        padding: 13px 14px;
        border-radius: var(--radius-sm);
    }

    .country-select {
        width: 110px;
        padding-right: 28px;
    }

    .submit-btn {
        padding: 15px 20px;
        font-size: 0.95rem;
    }

    .toast {
        padding: 14px 16px;
        font-size: 0.82rem;
    }
}

/* Mobile phones */
@media (max-width: 420px) {
    .container {
        padding: 16px 8px;
    }

    .card {
        padding: 24px 16px;
        border-radius: 16px;
    }

    .brand {
        margin-bottom: 22px;
    }

    .brand-tagline {
        font-size: 0.95rem;
    }

    .form {
        gap: 16px;
    }

    label {
        font-size: 0.75rem;
        gap: 6px;
    }

    .field-icon {
        width: 14px;
        height: 14px;
    }

    input,
    textarea,
    select {
        padding: 12px 12px;
    }

    .phone-wrapper {
        flex-direction: column;
        gap: 8px;
    }

    .country-select {
        width: 100%;
    }

    .offer-wrapper input {
        padding-left: 32px;
    }

    .currency-symbol {
        left: 12px;
        font-size: 0.95rem;
    }

    textarea {
        min-height: 80px;
    }

    .submit-btn {
        padding: 14px 16px;
        margin-top: 4px;
        border-radius: var(--radius-sm);
    }

    .toast {
        padding: 12px 14px;
        font-size: 0.8rem;
        gap: 8px;
        margin-top: 16px;
    }

    .toast svg {
        width: 18px;
        height: 18px;
    }
}

/* Very small phones (iPhone SE, etc.) */
@media (max-width: 340px) {
    .container {
        padding: 12px 4px;
    }

    .card {
        padding: 20px 12px;
        border-radius: 14px;
    }

    .brand-tagline {
        font-size: 0.88rem;
    }

    .form {
        gap: 14px;
    }

    input,
    textarea,
    select {
        padding: 11px 10px;
        font-size: 15px;
    }

    .submit-btn {
        padding: 13px 12px;
        font-size: 0.9rem;
    }
}

/* Landscape orientation on phones */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        align-items: flex-start;
    }

    .container {
        padding: 12px 16px;
    }

    .card {
        padding: 20px 24px;
    }

    .brand {
        margin-bottom: 16px;
    }

    .form {
        gap: 12px;
    }

    input,
    textarea,
    select {
        padding: 10px 12px;
    }

    textarea {
        min-height: 60px;
    }

    .submit-btn {
        padding: 12px 20px;
        margin-top: 4px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    input,
    textarea,
    select {
        min-height: 48px; /* Google's recommended touch target */
    }

    .submit-btn {
        min-height: 52px;
    }

    .country-select {
        min-height: 48px;
    }
}

/* ---------- Selection ---------- */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}
