:root {
    --bg-color: #f8f9fa;
    --text-color: #212529;
    --primary-color: #ff0000;
    --primary-hover: #cc0000;
    --card-bg: #ffffff;
    --border-radius: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.topnav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--card-bg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    z-index: 1000;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-color);
}
.nav-brand a {
    text-decoration: none;
}
.brand-name {
    text-decoration: none;
    color: var(--text-color);
}
.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    margin-left: 1.5rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary-color);
}


main {
    width: 100%;
    max-width: 1200px;
    padding: 2rem 1rem;
    scroll-behavior: smooth;
    padding-top: 120px;


}

.hero {
    text-align: center;
    margin-bottom: 3rem;
    margin-top: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

input {
    flex: 1;
    min-width: 250px;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border: 2px solid #ccc;
    border-radius: var(--border-radius);
    outline: none;
    transition: border-color 0.2s;
}

input:focus {
    border-color: var(--primary-color);
}

button {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

button:hover {
    background-color: var(--primary-hover);
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#error-message {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 1rem;
    font-weight: bold;
}

.hidden {
    display: none !important;
}

.results-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem; 
}

.card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: max-content; 
    max-width: 100%; 
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 2rem;
}

.card h3 {
    font-size: 1.25rem;
    margin: 0;
}

.badge {
    background-color: #eee;
    color: #555;
    font-size: 0.9rem;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-weight: bold;
}

.img-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa;
    border: 1px dashed #ccc;
    border-radius: 4px;
}

.card img {
    max-width: 100%;
    height: auto;
    display: block;
}

.card .btn-download {
    width: 100%;
    background-color: #333;
    padding: 0.8rem;
    margin-top: auto;
}

.card .btn-download:hover {
    background-color: #000;
}
/* --- Test URL Styles --- */
.test-url-text {
    text-align: center;
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 0.8rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.test-url-text a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    padding: 0.2rem 0.4rem;
    background-color: rgba(255, 0, 0, 0.05);
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.test-url-text a:hover {
    background-color: var(--primary-color);
    color: white;
}

@media screen and (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .nav-brand {
    font-size: 1rem;
  }
}
@media screen and (max-width: 600px) {
  button {
    width: 80%;
    margin-left: auto;
    margin-right: auto;
  }
}