/* ============================================
   CSS Variables & Reset
============================================ */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);

    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);

    --youtube: #ff0000;
    --tiktok: #00f2ea;
    --instagram: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    --twitter: #000000;
    --facebook: #1877f2;
    --pinterest: #e60023;

    --border-radius: 16px;
    --border-radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.15);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Header
============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
}

/* ============================================
   Hero Section
============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 72px;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 560px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 24px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.5);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-primary);
    top: -200px;
    right: -200px;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-secondary);
    bottom: -100px;
    left: -100px;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: #a855f7;
    top: 50%;
    left: 50%;
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.05);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

/* ============================================
   Tools Section
============================================ */
.tools-section {
    padding: 120px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 48px;
    text-align: center;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius);
    padding: 32px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: var(--transition);
}

.tool-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.tool-icon svg {
    width: 32px;
    height: 32px;
}

.tool-icon.youtube {
    background: rgba(255, 0, 0, 0.15);
    color: var(--youtube);
}

.tool-icon.tiktok {
    background: rgba(0, 242, 234, 0.15);
    color: var(--tiktok);
}

.tool-icon.instagram {
    background: linear-gradient(45deg, rgba(240, 148, 51, 0.15), rgba(188, 24, 136, 0.15));
    color: #e1306c;
}

.tool-icon.twitter {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.tool-icon.facebook {
    background: rgba(24, 119, 242, 0.15);
    color: var(--facebook);
}

.tool-icon.pinterest {
    background: rgba(230, 0, 35, 0.15);
    color: var(--pinterest);
}

.tool-icon.fancynick {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.15));
    color: var(--accent-primary);
}

.tool-icon.qrcode {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.tool-icon.password {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.tool-icon.textcounter {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
}

.tool-icon.color {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(59, 130, 246, 0.15), rgba(34, 197, 94, 0.15));
    color: #ec4899;
}

.tool-icon.iban {
    background: rgba(20, 184, 166, 0.15);
    color: #14b8a6;
}

/* Text Tools */
.tool-icon.textcase {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.tool-icon.lorem {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.tool-icon.slug {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

/* Developer Tools */
.tool-icon.json {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.tool-icon.base64 {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.tool-icon.urlencode {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}

.tool-icon.uuid {
    background: rgba(236, 72, 153, 0.15);
    color: #ec4899;
}

.tool-icon.hash {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

/* Calculators */
.tool-icon.age {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
}

.tool-icon.datediff {
    background: rgba(14, 165, 233, 0.15);
    color: #0ea5e9;
}

.tool-icon.percentage {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.tool-icon.unit {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.tool-icon.vat {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Turkey Tools */
.tool-icon.tckimlik {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(255, 255, 255, 0.1));
    color: #ef4444;
}

.tool-icon.vergino {
    background: rgba(20, 184, 166, 0.15);
    color: #14b8a6;
}

.tool-icon.plaka {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.tool-icon.phone {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

/* Text Tools Suite */
.tool-icon.wordcounterpro {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.tool-icon.markdown {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.tool-icon.htmlstrip {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
}

.tool-icon.regex {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.tool-icon.textdiff {
    background: rgba(236, 72, 153, 0.15);
    color: #ec4899;
}

.tool-icon.totp {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.tool-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.tool-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ============================================
   Modal
============================================ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-header {
    padding: 32px 32px 0;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-subtitle {
    color: var(--text-muted);
}

.modal-body {
    padding: 24px 32px 32px;
}

/* ============================================
   Form Elements
============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   Result Card
============================================ */
.result-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-sm);
    padding: 20px;
    margin-top: 24px;
}

.result-thumbnail {
    width: 100%;
    border-radius: var(--border-radius-sm);
    margin-bottom: 16px;
}

.result-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.result-author {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.download-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.download-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.download-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.download-quality {
    font-weight: 500;
}

.download-btn {
    padding: 6px 16px;
    background: var(--accent-primary);
    color: white;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ============================================
   Loading & Error States
============================================ */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: var(--text-muted);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.error-message {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
    color: #ff6b6b;
    padding: 16px;
    border-radius: var(--border-radius-sm);
    margin-top: 16px;
}

.success-message {
    background: rgba(52, 199, 89, 0.1);
    border: 1px solid rgba(52, 199, 89, 0.3);
    color: #4ade80;
    padding: 16px;
    border-radius: var(--border-radius-sm);
    margin-top: 16px;
}

/* ============================================
   Fancy Nick Results
============================================ */
.fancy-nick-results {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.fancy-style-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-sm);
    gap: 16px;
}

.fancy-style-name {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
    min-width: 100px;
}

.fancy-style-text {
    flex: 1;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: var(--transition);
    word-break: break-all;
}

.fancy-style-text:hover {
    background: rgba(99, 102, 241, 0.15);
}

.copy-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 16px;
}

/* reCAPTCHA container */
.g-recaptcha {
    margin: 16px 0;
    display: flex;
    justify-content: center;
}

/* ============================================
   New Tool Styles
============================================ */

/* Form enhancements */
.form-row {
    display: flex;
    gap: 16px;
}

.form-group.half {
    flex: 1;
}

.form-input-color {
    width: 100%;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    background: transparent;
}

.form-range {
    width: calc(100% - 50px);
    accent-color: var(--accent-primary);
}

.range-value {
    display: inline-block;
    width: 40px;
    text-align: right;
    color: var(--accent-primary);
    font-weight: 600;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    accent-color: var(--accent-primary);
    width: 18px;
    height: 18px;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.color-input-row {
    display: flex;
    gap: 12px;
}

.color-input-row .form-input {
    flex: 1;
}

.color-input-row .form-input-color {
    width: 44px;
    flex-shrink: 0;
}

/* QR Code */
.qrcode-result {
    text-align: center;
}

.qrcode-image {
    max-width: 256px;
    width: 100%;
    border-radius: var(--border-radius-sm);
}

/* Password List */
.password-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.password-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.password-item:hover {
    background: rgba(99, 102, 241, 0.1);
}

.password-text {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    word-break: break-all;
}

.copy-icon {
    font-size: 1.2rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat-item {
    text-align: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius-sm);
}

.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Color Converter */
.color-formats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.color-format-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.color-format-item:hover {
    background: rgba(99, 102, 241, 0.1);
}

.format-label {
    color: var(--text-muted);
    font-weight: 500;
}

.format-value {
    font-family: 'Courier New', monospace;
}

/* IBAN Details */
.iban-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.iban-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.iban-row:last-child {
    border-bottom: none;
}

.iban-label {
    color: var(--text-muted);
}

.iban-value {
    font-weight: 500;
}

code.iban-value {
    cursor: pointer;
    padding: 4px 8px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 4px;
}

code.iban-value:hover {
    background: rgba(99, 102, 241, 0.2);
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        flex-direction: column;
    }
}

/* ============================================
   Footer
============================================ */
.footer {
    padding: 80px 0 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-desc {
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto 24px;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============================================
   Responsive
============================================ */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .nav {
        display: none;
    }

    .modal-content {
        max-height: 100vh;
        border-radius: 0;
    }
}