:root {
    --bg-dark: #0f172a;
    --text-light: #f8fafc;
    --text-dim: #94a3b8;
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --accent: #fbbf24;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* Background Effects */
.background-glow {
    position: fixed;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle at 50% 50%, #1e1b4b 0%, #0f172a 60%);
    z-index: -1;
    pointer-events: none;
}

.background-glow::after {
    content: '';
    position: absolute;
    top: 20%;
    right: 20%;
    width: 400px;
    height: 400px;
    background: var(--primary-glow);
    filter: blur(120px);
    opacity: 0.2;
    border-radius: 50%;
    animation: pulse 10s infinite alternate;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.2;
    }

    100% {
        transform: scale(1.2);
        opacity: 0.3;
    }
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    flex: 1;
}

/* Header */
.header {
    text-align: center;
    margin-top: 4vh;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, var(--text-dim) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    letter-spacing: -2px;
}

.slogan {
    color: var(--text-dim);
    font-size: 1.2rem;
    font-weight: 300;
}

/* Input Card */
.input-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.input-card:hover {
    transform: translateY(-2px);
}

.input-label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

textarea {
    width: 100%;
    height: 120px;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    color: #fff;
    font-family: inherit;
    font-size: 1.1rem;
    resize: none;
    transition: all 0.3s ease;
    outline: none;
}

textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.cta-button {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.cta-button:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

.cta-button:active {
    transform: scale(0.98);
}

/* Results */
.hidden {
    display: none !important;
}

.result-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.result-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-crime {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-legal {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.result-content {
    line-height: 1.7;
    font-size: 1.05rem;
    color: #e2e8f0;
}

/* Footer */
.footer {
    width: 100%;
    padding: 2rem;
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid var(--glass-border);
    margin-top: auto;
    text-align: center;
}

.disclaimer {
    max-width: 600px;
    margin: 0 auto 2rem auto;
    padding: 1rem;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.05);
}

.disclaimer h3 {
    color: var(--danger);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.disclaimer p {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.copyright {
    font-size: 0.8rem;
    color: #475569;
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Settings Button */
.settings-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0.5rem;
}

.settings-btn:hover {
    color: var(--text-light);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-light);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.modal-body p {
    color: var(--text-dim);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--accent);
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    margin-bottom: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: var(--primary);
}

.info-box {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.info-box p {
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}


/* Top Bar - Improved */
.top-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* display: flex removed */
    /* justify-content: space-between removed */
    /* align-items: flex-start removed */
    padding: 0;
    z-index: 50;
    pointer-events: none;
}

/* Ensure top bar elements are interactive */
.top-bar>* {
    pointer-events: auto;
    position: absolute;
    /* Enable absolute positioning for children */
}

.ataturk-signature {
    top: 0;
    left: 0;
}

.ataturk-signature img {
    height: 100px;
    width: 100px;
    object-fit: contain;
    opacity: 1;
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
    margin: 10px;
    /* Small margin from the edge */
    display: block;
}

.ataturk-signature img:hover {
    transform: scale(1.1) rotate(-2deg);
}



/* Country Selector */
.country-selector-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    gap: 12px;
}

.country-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: rgba(30, 41, 59, 0.6);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 10px;
    padding: 6px 28px 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-light);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.country-select:hover {
    background-color: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

.country-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
    outline: none;
}

.country-select option {
    background-color: #0f172a;
    color: var(--text-light);
    padding: 10px;
}

.justice-text {
    top: 55px;
    /* Pushed down slightly to make room for selector */
    right: 20px;
    position: absolute;
    font-family: 'Playfair Display', serif;
    /* Classic serif font */
    font-weight: 700;
    font-style: italic;
    /* Classic elegant touch */
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: var(--text-light);
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 5px;
    text-align: right;
    transform: none;
    opacity: 1;
}

/* Adjust main container to prevent overlap */
.container {
    margin-top: 60px;
    /* Push content down */
}

@media (max-width: 768px) {


    .ataturk-signature img {
        height: 60px;
    }

    .justice-text {
        font-size: 0.7rem;
        /* Smaller for mobile */
        top: 70px;
        /* Re-align with smaller image */
        letter-spacing: 1px;
    }

    .container {
        margin-top: 120px;
        /* More space for stacked top bar */
    }
}