/* ------------------------------------------------------------------
   1. FONTS & VARIABLES
   ------------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800&display=swap');

:root {
    --accent-color: #e73c7e;
    --border-color: #e2e8f0;
    --text-dark: #2d3748;
    --text-light: #718096;
    --brand-blue: #23a6d5;
}

/* ------------------------------------------------------------------
   2. GLOBAL RESET & BODY ANIMATION
   ------------------------------------------------------------------ */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    display: flex;
    justify-content: flex-start; 
    align-items: stretch; 
    min-height: 100vh;
    margin: 0;
    color: var(--text-dark);
    flex-direction: column;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ------------------------------------------------------------------
   3. SITE HEADER (LOGO + NAV)
   ------------------------------------------------------------------ */
.site-header {
    width: 100%;
    padding: 20px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-img {
    height: 70px;
    width: auto;
    display: block;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
    transition: transform 0.2s;
}

.logo-img:hover {
    transform: scale(1.02);
}

.main-nav {
    display: flex;
    gap: 25px;
}

.nav-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.nav-link:hover {
    color: #ffffff;
    transform: translateY(-1px);
    text-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.nav-link.active::after {
    content: '';
    display: block;
    width: 100%;
    height: 3px;
    background: white;
    position: absolute;
    bottom: -5px;
    border-radius: 2px;
}

/* ------------------------------------------------------------------
   4. MAIN CONTAINER (GLASS BOX)
   ------------------------------------------------------------------ */
.container {
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem 3rem;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 900px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    margin: 4vh auto 0 auto; 
}

/* ------------------------------------------------------------------
   5. URL SHORTENER FORM ELEMENTS
   ------------------------------------------------------------------ */
.box-intro {
    margin-top: 0;
    margin-bottom: 25px;
    color: var(--text-dark);
    font-size: 1.3rem;
    font-weight: 700;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
    align-items: center;
}

.main-input {
    width: 100%;
    padding: 14px 15px;
    border: 2px solid var(--border-color);
    background: #fff;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: all 0.3s;
}

.main-input:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 4px rgba(35, 166, 213, 0.2);
}

/* Custom Name Field Group */
.custom-field-group {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    flex: 2; 
}

.prefix {
    background: #edf2f7;
    color: var(--text-light);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 14px 12px;
    border-right: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    white-space: nowrap;
    user-select: none;
}

.custom-field-group input[type="text"] {
    border: none;
    background: #fff;
    padding: 14px 10px;
    width: 100%;
    outline: none;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
}

.primary-btn {
    padding: 14px 30px;
    border: none;
    background: linear-gradient(45deg, #FF512F 0%, #DD2476 100%);
    color: white;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 15px -5px rgba(221, 36, 118, 0.5);
    flex: 1; 
    white-space: nowrap;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -8px rgba(221, 36, 118, 0.6);
}

/* ------------------------------------------------------------------
   6. ALERTS & ACTION BUTTONS
   ------------------------------------------------------------------ */
.message { margin-top: 20px; padding: 15px; border-radius: 12px; font-size: 0.9rem; }
.error { background-color: #fff5f5; color: #e53e3e; border: 2px solid #feb2b2; font-weight: 700; }
.success { background-color: #fff5f7; border: 2px solid #f687b3; }
.short-url { font-size: 1.3rem; font-weight: 800; color: var(--brand-blue); text-decoration: none; display:block; margin: 10px 0;}

.action-buttons { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }
.action-btn { padding: 8px 16px; border-radius: 10px; border: 1px solid #d1d5db; background: white; cursor: pointer; font-family: 'Outfit'; font-weight: 600; flex: 1; transition: all 0.2s; }
.action-btn:hover { background: #f3f4f6; transform: translateY(-1px); }

/* QR Code Container */
.qr-container {
    display: flex;
    justify-content: center;
    margin: 20px auto;
    padding: 10px;
    background: white;
    width: fit-content;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.qr-container img { display: block; }

/* ------------------------------------------------------------------
   7. PAPER SIZE & SOCIAL SIZE TABLES
   ------------------------------------------------------------------ */
section.paper-section {
    background: white;
    margin-bottom: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    overflow: hidden;
    border: 1px solid var(--border-color);
    text-align: left;
}

.section-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1a1a1a;
}

.section-header::before {
    content: '';
    display: block;
    width: 6px;
    height: 24px;
    background: linear-gradient(180deg, #FF512F 0%, #DD2476 100%);
    border-radius: 3px;
}

/* Tables */
table { width: 100%; border-collapse: collapse; text-align: left; }
th { background-color: #f1f5f9; color: #64748b; font-weight: 700; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; padding: 1rem 2rem; }
td { padding: 1rem 2rem; border-bottom: 1px solid var(--border-color); font-weight: 400; color: #334155; }
td:not(:first-child) { font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background-color: #fff5f7; }
.size-name { font-weight: 700; color: var(--accent-color); }

/* ------------------------------------------------------------------
   8. VISUALIZERS (PAPER & SOCIAL)
   ------------------------------------------------------------------ */
.visualizer-container, .social-vis-wrapper {
    background-color: #fafafa;
    border-bottom: 1px solid var(--border-color);
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    overflow: hidden;
}

/* Paper Visualizer Specifics */
.a0-container {
    aspect-ratio: 1 / 1.414;
    width: 100%;
    max-width: 500px;
    border: 2px solid #1a1a1a;
    background: white;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    color: #1a1a1a;
}

.split-v { display: flex; flex-direction: column; flex: 1; }
.split-h { display: flex; flex-direction: row; flex: 1; }

.paper-box {
    flex: 1; display: flex; align-items: center; justify-content: center;
    position: relative; font-weight: 700; font-size: 1.5rem;
    transition: background 0.3s; overflow: hidden;
}
.paper-box:hover { background-color: #fff0f5; color: var(--accent-color); cursor: default; }
.border-top { border-top: 1px solid #1a1a1a; }
.border-left { border-left: 1px solid #1a1a1a; }
.border-right { border-right: 1px solid #1a1a1a; }
.border-bottom { border-bottom: 1px solid #1a1a1a; }

.dim { position: absolute; font-size: 0.65rem; color: #94a3b8; font-weight: 400; pointer-events: none; }
.dim-w { bottom: 4px; left: 50%; transform: translateX(-50%); }
.dim-h { right: 4px; top: 50%; transform: translateY(-50%) rotate(90deg); }
.size-lg { font-size: 3rem; opacity: 0.1; position: absolute; bottom: 0; width: 100%; text-align: center; } 
.size-md { font-size: 2.5rem; }
.size-sm { font-size: 1.5rem; }
.size-xs { font-size: 1rem; }

/* Social Media Visualizer Specifics */
.vis-box {
    background: white;
    border: 2px solid #2d3748;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #2d3748;
    font-size: 0.9rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
}
.vis-label { position: absolute; font-size: 0.7rem; color: #718096; font-weight: 400; width: 100%; text-align: center; bottom: 5px; }

/* Social Ratios */
.ig-square { width: 120px; height: 120px; }
.ig-portrait { width: 120px; height: 150px; }
.ig-story { width: 108px; height: 192px; }

.cover-layout {
    width: 340px; height: 130px; 
    display: flex; align-items: flex-start; justify-content: flex-end; 
    padding: 10px;
}
.profile-overlay {
    width: 80px; height: 80px; background: #edf2f7; border: 2px solid #2d3748; 
    border-radius: 50%; position: absolute; bottom: -20px; left: 20px; 
    display: flex; align-items: center; justify-content: center; 
    font-size: 0.7rem; box-shadow: 0 2px 4px rgba(0,0,0,0.1); z-index: 2;
}

.yt-banner-vis {
    width: 100%; max-width: 400px; aspect-ratio: 16 / 9; border: 2px solid #cbd5e0;
    background: #fff; position: relative; display: flex; align-items: center; justify-content: center;
}
.yt-safe-zone {
    width: 90%; height: 25%; background: #e2e8f0; border: 2px solid #2d3748; 
    display: flex; align-items: center; justify-content: center; font-size: 0.8rem; position: relative;
}
.yt-mobile-safe {
    width: 60%; height: 100%; border-left: 1px dashed #2d3748; border-right: 1px dashed #2d3748;
    position: absolute; top: 0; display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; background: rgba(0,0,0,0.03);
}

.pin-standard { width: 120px; height: 180px; }
.twitch-banner { width: 340px; height: 100px; }
.discord-icon { width: 100px; height: 100px; border-radius: 50%; }

/* ------------------------------------------------------------------
   9. SEO TEXT & CONTENT BLOCKS
   ------------------------------------------------------------------ */
.content-container { width: 90%; max-width: 800px; margin: 40px auto 60px auto; color: white; text-shadow: 0 1px 4px rgba(0,0,0,0.2); }
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 40px; }
.content-block h2, .faq-section h2 { font-size: 1.5rem; margin-bottom: 15px; border-bottom: 2px solid rgba(255,255,255,0.3); padding-bottom: 10px; display: inline-block; }
.content-block p, .faq-item p { font-size: 1rem; line-height: 1.6; margin-bottom: 15px; opacity: 0.95; }

.text-content { padding: 2rem 3.5rem; color: #334155; text-align: left; }
.text-content h3 { margin-top: 2rem; margin-bottom: 0.75rem; color: #1a1a1a; font-weight: 700; font-size: 1.2rem; }
.text-content p { margin-bottom: 1rem; line-height: 1.7; }

/* Features List & Ticks */
.feature-list { list-style: none; padding: 0; }
.feature-list li { margin-bottom: 12px; font-size: 1rem; display: flex; align-items: flex-start; gap: 10px; }
.tick-icon { width: 22px; height: 22px; color: #4ade80; flex-shrink: 0; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.2)); }

/* FAQ */
.faq-section { background: rgba(0, 0, 0, 0.2); padding: 30px; border-radius: 20px; }
.faq-item { margin-bottom: 20px; }
.faq-item strong { font-size: 1.1rem; display: block; margin-bottom: 5px; color: #fff; }

/* ------------------------------------------------------------------
   10. FOOTER
   ------------------------------------------------------------------ */
.site-footer {
    width: 100%;
    background-color: #000000;
    text-align: center;
    padding: 25px 0;
    margin-top: auto;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ------------------------------------------------------------------
   11. RESPONSIVE MEDIA QUERIES
   ------------------------------------------------------------------ */
@media (max-width: 700px) {
    .site-header { flex-direction: column; gap: 15px; }
    .form-row { flex-direction: column; }
    .container { padding: 2rem 1.5rem; }
    .content-grid { grid-template-columns: 1fr; }
    
    /* Table tweaks */
    th, td { padding: 0.75rem 1rem; font-size: 0.85rem; }
    
    /* Social visualizer tweaks */
    .social-vis-wrapper { gap: 10px; padding: 20px 10px; }
    .ig-square, .ig-portrait, .ig-story, .pin-standard { transform: scale(0.8); }
    .cover-layout, .twitch-banner { width: 100%; }
}