/*
 * ThisSupposeToBeFree.com - Redesign Stylesheet
 * ---------------------------------------------
 * Mission: Minimal, fast, and accessible design.
 * Author: Gemini (based on user prompt)
 */

/* ------------------------------ */
/* 1. Base & Variables            */
/* ------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
  --bg-primary: #FFFDF6;
  --bg-secondary: #FFFBEA;
  --text-primary: #1B1B1B;
  --text-secondary: #4A4A4A;
  --accent-primary: #FFED4A;
  --accent-hover: #FEEA8B;
  --border-color: #EAEAEA;
  --shadow-color: rgba(0, 0, 0, 0.05);
  --success-color: #28a745;
  --error-color: #dc3545;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

body.loaded {
  opacity: 1;
}

/* ------------------------------ */
/* 2. Layout & Container          */
/* ------------------------------ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.main-content {
  padding-top: 80px; /* Offset for fixed navbar */
  padding-bottom: 4rem;
}

section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border-color);
}

section:last-of-type {
  border-bottom: none;
}

.ad-placeholder {
    padding: 2rem 0;
}


/* ------------------------------ */
/* 3. Typography & Links          */
/* ------------------------------ */
h1, h2, h3, h4 {
  line-height: 1.2;
  margin-bottom: 1rem;
  font-weight: 700;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  max-width: 65ch;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-primary);
}

.affiliate-disclosure {
    text-align: center;
    font-size: 0.9rem;
    font-style: italic;
    max-width: 100%;
    margin-bottom: 2rem;
}

.highlight-text {
    font-weight: 700;
    color: var(--text-primary);
}

/* ------------------------------ */
/* 4. Components                  */
/* ------------------------------ */

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: var(--text-primary);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px var(--shadow-color);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-secondary);
  border-color: #ddd;
}

.btn-success {
    background-color: var(--success-color);
    color: #fff;
}
.btn-success:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Cards */
.card {
  background-color: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px var(--shadow-color);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px var(--shadow-color);
}

.card h3 {
  margin-top: 0;
}

.card-link {
    text-decoration: none;
    color: inherit;
}
.card-link:hover {
    color: inherit;
}


/* Grids */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ------------------------------ */
/* 5. Navbar                      */
/* ------------------------------ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 253, 246, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
}
.nav-logo a:hover {
    color: var(--text-primary);
}

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link a {
  padding: 0.5rem;
}
.nav-link a.btn-primary {
    padding: 0.6rem 1.2rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}


.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--text-primary);
  transition: all 0.3s ease-in-out;
}

/* ------------------------------ */
/* 6. Footer                      */
/* ------------------------------ */
.footer {
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 3rem 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  text-align: center;
}

.footer-tagline {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0;
}

.footer-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.footer-links a {
    color: var(--text-secondary);
    font-weight: 400;
}
.footer-links a:hover {
    color: var(--text-primary);
}

.footer .copyright {
    margin: 0;
    padding-top: 1rem;
    font-size: 0.9rem;
}

/* ------------------------------ */
/* 7. Page-Specific Sections      */
/* ------------------------------ */

/* Hero Section (Homepage) */
.hero {
  text-align: center;
  padding: 6rem 0;
}
.hero h1 {
  max-width: 15ch;
  margin-left: auto;
  margin-right: auto;
}
.hero .tagline {
  font-size: 1.1rem;
  margin-top: -0.5rem;
  margin-bottom: 2rem;
}
.hero .cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Mission Section (Homepage) */
.mission-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}
.mission-text, .mission-icon {
    flex: 1;
}
.mission-icon {
    font-size: 6rem;
    text-align: center;
}


/* Shoutout Wall (Homepage) */
#shoutouts {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 3rem 2rem;
}
.shoutout-card {
    background: #fff;
    padding: 1.5rem;
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
}
.shoutout-card h3 {
    margin-bottom: 0.5rem;
}


/* About/Privacy Page */
.page-header {
  text-align: center;
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}
.page-content {
  max-width: 750px;
  margin: 0 auto;
}
.page-content h2 {
    margin-top: 2.5rem;
}

/* ------------------------------ */
/* 8. Converter Tool Page         */
/* ------------------------------ */
.tool-header {
    text-align: center;
    padding-bottom: 3rem;
}
.tool-header p {
    margin-left: auto;
    margin-right: auto;
}

#upload-area {
    border: 3px dashed var(--border-color);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    background-color: #fff;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#upload-area p {
    margin-bottom: 1.5rem;
}

#drag-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(255, 237, 74, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

#drag-overlay.visible {
    opacity: 1;
}

.controls-section {
    margin-top: 2rem;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.controls-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

#format-select, #quality-slider {
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.file-list-container {
    margin-top: 2rem;
}

#file-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#file-list li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.file-info {
    flex-grow: 1;
    word-break: break-all;
    min-width: 150px;
}

.file-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.remove-file {
    background: none;
    border: none;
    color: var(--error-color);
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
    padding: 0.25rem;
}

.privacy-note {
    text-align: center;
    margin-top: 3rem;
    font-style: italic;
    color: var(--text-secondary);
}

/* ------------------------------ */
/* 9. Responsive Design           */
/* ------------------------------ */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }

    /* Mobile Menu */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-primary);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }
    .nav-menu.active {
        left: 0;
    }
    .nav-link {
        padding: 1rem 0;
        width: 100%;
    }
    .nav-link a.btn {
        margin: 0.5rem auto;
        display: inline-block;
    }
    .hamburger {
        display: block;
    }
    .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); }

    /* Grids */
    .grid-3, .grid-2 {
        grid-template-columns: 1fr;
    }

    /* Hero */
    .hero { padding: 4rem 0; }
    .hero .cta-buttons { flex-direction: column; }
    
    /* Mission */
    .mission-content { flex-direction: column; }

    /* Controls */
    .controls-grid {
        flex-direction: column;
        align-items: stretch;
    }
    .controls-grid > div {
        width: 100%;
    }
    
    #file-list li {
        flex-direction: column;
        align-items: flex-start;
    }
    .file-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 0.5rem;
    }
}
