/* style.css */
@font-face {
    font-family: 'VT323';
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url('../fonts/VT323-Regular.ttf') format('truetype');
}

:root {
    --color-bg: #f0f0f0;
    --color-text: #000000;
    /* Brand Colors extracted from Favicon */
    --color-brand-yellow: #FFDE00;
    --color-brand-green: #5CC92E;
    --color-brand-pink: #E90074;
    --color-brand-blue: #0098DA;

    --color-accent: var(--color-brand-blue);
    --color-border: #000000;
    --color-shadow: #000000;

    --color-success: var(--color-brand-green);
    --color-error: var(--color-brand-pink);
    /* Using Pink for errors/accents */
    --color-warning: var(--color-brand-yellow);

    --border-width: 3px;
    --shadow-offset: 5px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', Courier, monospace;
    /* Typewriter style for body */
    background-color: var(--color-bg);
    color: var(--color-text);
    margin: 0;
    padding: 2rem;
    line-height: 1.5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Apply Retro Font to UI elements */
h1,
button,
label,
.lang-switcher,
.alert {
    font-family: 'VT323', monospace;
}

/* Enforce sharp corners for retro feel */
.container,
input,
textarea,
button,
.alert,
.decoration-bar {
    border-radius: 0 !important;
}

.container {
    width: 100%;
    max-width: 600px;
    background-color: #fff;
    border: var(--border-width) solid var(--color-border);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px 0px var(--color-shadow);
    padding: 2rem;
    container-type: inline-size;
    /* Enable container queries */
}

h1 {
    font-weight: 900;
    text-transform: uppercase;
    font-size: 12.5cqi;
    /* Increased to ~95% */
    text-align: center;
    /* Center the text */
    white-space: nowrap;
    /* Force one line */
    margin-top: 0;
    margin-bottom: 1.5rem;
    /* Removed border-bottom and padding-bottom */
    letter-spacing: -1px;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 400;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-size: clamp(1.5rem, 6cqi, 2rem);
    /* Increased label size */
    /* Responsive label */
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 1rem;
    font-family: inherit;
    font-size: clamp(1rem, 3cqi, 1.2rem);
    /* Reduced input/placeholder size */
    /* Responsive input text */
    border: var(--border-width) solid var(--color-border);
    background-color: #fff;
    outline: none;
    transition: all 0.1s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    box-shadow: 3px 3px 0px 0px var(--color-shadow);
    transform: translate(-2px, -2px);
}

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

.primary-button {
    display: inline-block;
    background-color: var(--color-accent);
    color: #fff;
    font-weight: 400;
    /* VT323 is naturally bold/thick */
    text-transform: uppercase;
    border: var(--border-width) solid var(--color-border);
    padding: 0.5rem 0.5rem;
    /* Reduced horizontal padding */
    font-size: clamp(1.3rem, 7cqi, 2.2rem);
    /* Increased button size */
    /* Reduced min size */
    cursor: pointer;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px 0px var(--color-shadow);
    transition: all 0.1s ease;
    width: 100%;
    /* Make button full width to match "responsive" feel often desired */
    white-space: nowrap;
    /* Keep text and arrow on same line */
}

.primary-button:hover {
    transform: translate(-2px, -2px);
    box-shadow: calc(var(--shadow-offset) + 2px) calc(var(--shadow-offset) + 2px) 0px 0px var(--color-shadow);
}

.primary-button:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px 0px var(--color-shadow);
}

.alert {
    padding: 1rem;
    border: var(--border-width) solid var(--color-border);
    margin-bottom: 2rem;
    font-weight: bold;
    box-shadow: 3px 3px 0px 0px var(--color-shadow);
}

.alert-success {
    background-color: var(--color-success);
    color: #fff;
}

.alert-error {
    background-color: var(--color-error);
    color: #fff;
}

/* Decorative elements */
.decoration-bar {
    height: 15px;
    background: linear-gradient(90deg,
            var(--color-brand-yellow) 0%,
            var(--color-brand-yellow) 25%,
            var(--color-brand-green) 25%,
            var(--color-brand-green) 50%,
            var(--color-brand-pink) 50%,
            var(--color-brand-pink) 75%,
            var(--color-brand-blue) 75%,
            var(--color-brand-blue) 100%);
    border: var(--border-width) solid var(--color-border);
    margin-bottom: 2rem;
    box-shadow: 3px 3px 0px 0px var(--color-shadow);
}

/* Sticky Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: var(--border-width) solid var(--color-border);
    z-index: 1000;
    padding: 0.5rem 2rem;
    box-shadow: 0px 4px 0px 0px var(--color-shadow);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 60px;
    width: auto;
    display: block;
}

.lang-switcher {
    font-weight: 800;
    font-size: 1.2rem;
    /* Slightly reduced base size */
    display: flex;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .lang-switcher {
        font-size: 1.5rem;
        /* Reduced desktop size */
    }
}

.lang-switcher a {
    text-decoration: none;
    color: var(--color-text);
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.lang-switcher a:hover,
.lang-switcher a.active {
    opacity: 1;
    color: var(--color-brand-blue);
}

.lang-switcher .separator {
    opacity: 0.3;
}

/* Adjust body padding for fixed header */
body {
    padding-top: 100px;
    /* Header height + spacing */
}

/* Header Layout */
.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    align-items: center;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 800;
    font-size: 1.2rem;
    text-transform: uppercase;
    cursor: pointer;
    padding: 1rem;
    /* Large touch target */
    margin: -1rem;
    /* Pull back margin to maintain visual spacing but keep hitbox */
    position: relative;
    z-index: 2;
    font-family: 'VT323', monospace;
    /* Retro font */
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #fff;
    min-width: 160px;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px 0px var(--color-shadow);
    border: var(--border-width) solid var(--color-border);
    z-index: 1;
    margin-top: 0.5rem;
}

/* Bridge the gap between toggle and content */
.dropdown-content::before {
    content: "";
    position: absolute;
    top: -1rem;
    /* Increased area */
    left: 0;
    width: 100%;
    height: 1rem;
    /* Increased height */
    background: transparent;
}

.dropdown-content a {
    color: var(--color-text);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-weight: 400;
    text-transform: uppercase;
    font-size: 1.2rem;
    font-family: 'VT323', monospace;
    /* Retro font */
}

.dropdown-content a:hover {
    background-color: var(--color-accent);
    color: #fff;
}

.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
    display: block;
}

@media (min-width: 768px) {
    .dropdown-toggle {
        font-size: 1.5rem;
    }

    .dropdown-content a {
        font-size: 1.5rem;
    }
}

/* Tool Page Styles */
.tool-container {
    text-align: center;
    padding: 4rem 2rem;
}

.ip-label {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.ip-display {
    font-size: clamp(1rem, 6cqi, 5rem);
    /* Reduced min size for mobile */
    font-weight: 900;
    color: var(--color-accent);
    margin: 1rem 0 1rem 0;
    /* Reduced bottom margin for copy button */
    padding: 2rem;
    border: var(--border-width) solid var(--color-border);
    background-color: #fff;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px 0px var(--color-shadow);
    display: inline-block;
    max-width: 100%;
    /* Ensure it doesn't overflow container */
    white-space: nowrap;
    /* Force one line */
    overflow: hidden;
    /* Hide overflow if it happens */
    text-overflow: ellipsis;
    /* Add ellipsis if it overflows */
}

input[type="text"],
input[type="email"],
input[type="url"],
textarea {
    width: 100%;
    padding: 1rem;
    border: var(--border-width) solid var(--color-border);
    background-color: #fff;
    font-family: inherit;
    font-size: 1.2rem;
    /* Reduced input/placeholder size */
    font-size: clamp(1rem, 4cqi, 1.2rem);
    /* Responsive input text */
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px 0px var(--color-shadow);
    transition: all 0.1s ease;
    resize: vertical;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
textarea:focus {
    outline: none;
    transform: translate(-2px, -2px);
    box-shadow: calc(var(--shadow-offset) + 2px) calc(var(--shadow-offset) + 2px) 0px 0px var(--color-shadow);
}

.secondary-button {
    display: inline-block;
    background-color: var(--color-brand-yellow);
    color: var(--color-text);
    font-weight: 800;
    text-transform: uppercase;
    border: var(--border-width) solid var(--color-border);
    padding: 0.5rem 1rem;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px 0px var(--color-shadow);
    transition: all 0.1s ease;
    margin-bottom: 3rem;
    width: fit-content;
    /* Add space below */
    font-family: 'VT323', monospace;
}

.secondary-button:hover {
    transform: translate(-2px, -2px);
    box-shadow: calc(var(--shadow-offset) + 2px) calc(var(--shadow-offset) + 2px) 0px 0px var(--color-shadow);
}

.secondary-button:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px 0px var(--color-shadow);
}

.back-button {
    display: inline-block;
    text-decoration: none;
    color: #fff;
    font-weight: 400;
    /* Match button weight */
    text-transform: uppercase;
    border: var(--border-width) solid var(--color-border);
    padding: 0.5rem 0.5rem;
    /* Match button padding */
    font-size: clamp(1.3rem, 7cqi, 2rem);
    /* Match button size */
    background-color: var(--color-brand-pink);
    /* Pink color */
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px 0px var(--color-shadow);
    font-family: 'VT323', monospace;
    /* Explicitly set font */
    white-space: nowrap;
    /* Prevent wrapping */
}

.back-button:hover {
    transform: translate(-2px, -2px);
    box-shadow: calc(var(--shadow-offset) + 2px) calc(var(--shadow-offset) + 2px) 0px 0px var(--color-shadow);
    background-color: var(--color-brand-pink);
    /* Keep pink on hover */
    color: #fff;
}

/* Result Card (Generic Component) */
.result-card {
    border: var(--border-width) solid var(--color-border);
    background-color: #fff;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px 0px var(--color-shadow);
    margin-top: 2rem;
    overflow: hidden;
    text-align: left;
}

.og-image {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: var(--border-width) solid var(--color-border);
}

.og-content {
    padding: 1.5rem;
}

.og-title {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    line-height: 1.2;
}

.og-description {
    font-size: 1.2rem;
    opacity: 0.8;
    line-height: 1.4;
}

/* Tool Page Specifics */

.tool-container .decoration-bar {
    margin-bottom: 2rem;
    width: 100%;
}

/* Contact Page Specifics */
.contact-container .decoration-bar {
    margin-bottom: 2rem;
    width: 100%;
}

/* Page Header Component */
.page-title {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 1rem;
}

/* Mobile Menu Styles */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    z-index: 1001;
    /* Above menu overlay */
    box-shadow: none;
    /* Remove default button shadow */
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: var(--color-text);
    border-radius: 0;
    /* Sharp edges */
}

/* Hamburger Animation */
.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile & Tablet Styles */
@media (max-width: 1024px) {
    .hamburger {
        display: block;
    }

    .header-right {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background-color: var(--color-bg);
        width: 100%;
        height: 100vh;
        /* Full screen */
        text-align: center;
        transition: 0.3s;
        box-shadow: none;
        padding-top: 80px;
        /* Space for header */
        z-index: 1000;
        justify-content: flex-start;
        align-items: center;
        gap: 2rem;
    }

    .header-right.active {
        left: 0;
    }

    /* Prevent scrolling when menu is open */
    body.menu-open {
        overflow: hidden;
    }

    .nav-menu {
        flex-direction: column;
        gap: 2rem;
    }

    .dropdown-content {
        position: static;
        box-shadow: var(--shadow-offset) var(--shadow-offset) 0px 0px var(--color-shadow);
        border: var(--border-width) solid var(--color-border);
        padding: 0;
        display: none;
        /* Hidden by default on mobile */
        background-color: #fff;
        text-align: left;
        width: 80%;
        /* Limit width */
        margin: 1rem auto 0;
        /* Center */
    }

    /* Show dropdown content when parent is hovered or always visible for simplicity on mobile */
    .dropdown:hover .dropdown-content {
        display: flex;
        flex-direction: column;
        gap: 0;
        /* Remove gap for connected items */
        margin-top: 1rem;
    }

    .dropdown-content a {
        padding: 1rem;
        border-bottom: var(--border-width) solid var(--color-border);
        color: var(--color-text);
        text-decoration: none;
        display: block;
        transition: background-color 0.2s;
    }

    .dropdown-content a:last-child {
        border-bottom: none;
    }

    .dropdown-content a:hover {
        background-color: var(--color-brand-blue);
        color: #fff;
    }

    /* Make dropdown toggle act as a section header */
    .dropdown-toggle {
        font-size: 2rem;
        /* Larger font for mobile */
    }

    .nav-menu a {
        font-size: 1.5rem;
    }

    .lang-switcher {
        margin-top: 2rem;
        font-size: 1.5rem;
        background-color: #fff;
        border: var(--border-width) solid var(--color-border);
        box-shadow: var(--shadow-offset) var(--shadow-offset) 0px 0px var(--color-shadow);
        padding: 0.5rem 1rem;
        display: inline-flex;
        gap: 1rem;
    }
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    border-top: var(--border-width) solid var(--color-border);
    padding: 1.5rem;
    z-index: 2000;
    box-shadow: 0px -4px 0px 0px var(--color-shadow);
    display: flex;
    justify-content: center;
}

.cookie-content {
    max-width: 1200px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cookie-content p {
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    margin: 0;
    font-weight: 400;
    text-transform: uppercase;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
}

.cookie-buttons .primary-button,
.cookie-buttons .secondary-button {
    margin-bottom: 0; /* Override default margin */
    font-size: 1.5rem; /* Consistent size */
    padding: 0.5rem 1.5rem;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-buttons .primary-button,
    .cookie-buttons .secondary-button {
        width: 100%;
        text-align: center;
    }
}
/* Cookie Settings Floating Icon */
.cookie-settings-icon {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 60px;
    height: 60px;
    background-color: var(--color-brand-yellow);
    border: var(--border-width) solid var(--color-border);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px 0px var(--color-shadow);
    cursor: pointer;
    z-index: 1999;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
    padding: 0;
}

.cookie-settings-icon:hover {
    transform: translate(-2px, -2px);
    box-shadow: calc(var(--shadow-offset) + 2px) calc(var(--shadow-offset) + 2px) 0px 0px var(--color-shadow);
}

.cookie-settings-icon:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px 0px var(--color-shadow);
}

@media (max-width: 768px) {
    .cookie-settings-icon {
        width: 50px;
        height: 50px;
        bottom: 1rem;
        left: 1rem;
        font-size: 1.5rem;
    }
}
