:root {
    --primary-color: #0066cc;
    --background-color: #f4f6f8;
    --text-color: #333;
    --card-bg: #fff;
    --border-radius: 8px;
}

@font-face {
    font-family: 'Gilroy';
    src: url('static/fonts/gilroy_regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

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

body {
    font-family: 'Gilroy', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: var(--primary-color);
    background: linear-gradient(135deg, #0066cc 0%, #004c99 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
}

header h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.1;
}

header h2 {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 1.2rem;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 2px;
}

header p {
    font-size: 1rem;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    display: inline-block;
}

.search-panel {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group.full-width {
    flex: 1 1 100%;
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #666;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

button#search-btn {
    font-family: inherit;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

button#search-btn:hover {
    background-color: #0052a3;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.result-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.2s;
}

.result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.result-header {
    background-color: #f8f9fa;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.result-header h3 {
    font-size: 1.1rem;
    color: var(--text-color);
}

.result-body {
    padding: 1.5rem;
}

.bracket-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bracket-info .label {
    color: #666;
    font-size: 0.9rem;
}

.bracket-info .value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.no-results {
    width: 100%;
    text-align: center;
    padding: 2rem;
    color: #888;
    font-size: 1.1rem;
}

footer {
    text-align: center;
    padding: 2rem 0;
    color: #888;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
}

/* Bracket Image Styles */
.bracket-image-container {
    text-align: center;
    margin: 15px 0;
    padding: 0 15px;
    height: 220px; /* Fixed height container to prevent layout shift */
    display: flex;
    align-items: center;
    justify-content: center;
}

.bracket-image-container img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bracket-image-container img:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

/* Image Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.85); /* Dark overlay */
    align-items: center;
    justify-content: center;
}

.modal-content {
    margin: auto;
    display: block;
    width: 960px;
    height: 960px;
    object-fit: contain; /* Keep aspect ratio inside the box */
    background: transparent;
    max-width: 95vw; /* Responsive constraint */
    max-height: 95vh; /* Responsive constraint */
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    line-height: 1;
    z-index: 1001;
}

.close-btn:hover {
    color: #ccc;
}

/* Add pointer cursor to bracket images to indicate clickability */
.bracket-image-container img {
    cursor: pointer;
}

/* Login Modal Styles */
.login-content {
    background-color: #fff;
    width: 400px;
    height: auto;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-align: center;
    position: relative;
    max-width: 90%;
}

.login-content h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.login-content .form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.login-content input {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.login-content button {
    width: 100%;
    padding: 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
}

.login-content button:hover {
    background-color: #0052a3;
}
