/* ============================================
   VARIÁVEIS CSS
   ============================================ */
:root {
    --primary: #FF6B35;
    --primary-dark: #E55A2B;
    --bg-dark: #0A0A0A;
    --bg-card: #1A1A1A;
    --text-primary: #FFFFFF;
    --text-secondary: #B0B0B0;
    --border: #2A2A2A;
    --success: #10B981;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
header {
    position: sticky;
    top: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
    transition: var(--transition);
}

.logo:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
    max-width: 200px;
    object-fit: contain;
}

/* Navigation Menu */
nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

nav a:hover {
    color: var(--text-primary);
}

nav a:hover::after {
    width: 100%;
}

/* Login Button */
.btn-login button {
    transition: var(--transition);
    cursor: pointer;
}

.btn-login button:hover {
    background: var(--primary) !important;
    color: var(--bg-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

/* Menu Toggle (Mobile) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 200px);
}

section {
    width: 100%;
}

section p,
section h1,
section h2,
section h3 {
    color: inherit;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    text-align: center;
    padding: 6rem 0;
    max-width: 800px;
    margin: 0 auto;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.subheadline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

main > p:not(.subheadline):not(.warning) {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

button, 
input[type="submit"],
.btn {
    background: var(--primary);
    color: var(--bg-dark);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

button:hover, 
input[type="submit"]:hover,
.btn:hover,
form button[type="submit"]:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--bg-dark);
}

/* ============================================
   FORMS
   ============================================ */
form {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 20px;
    max-width: 600px;
    margin: 0 auto 2rem;
    border: 1px solid var(--border);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

input, 
select, 
textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    margin-bottom: 1.5rem;
    background: var(--bg-dark);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus, 
select:focus, 
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

input[type="file"] {
    padding: 0.5rem;
}

/* ============================================
   RESULTS & CARDS
   ============================================ */
#result {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    margin-top: 2rem;
    border: 1px solid var(--border);
    text-align: center;
    font-size: 1.1rem;
}

#result:empty {
    display: none;
}

.detail-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    max-width: 800px;
    margin: 0 auto;
}

.detail-card p {
    margin-bottom: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.detail-card p:last-of-type {
    border-bottom: none;
}

.detail-card strong {
    color: var(--text-secondary);
    margin-right: 1rem;
    font-weight: 500;
}

.detail-card img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin-top: 1rem;
}

/* ============================================
   TABLES
   ============================================ */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
}

th {
    background: var(--bg-dark);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 1rem;
    border-top: 1px solid var(--border);
}

td a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

td a:hover {
    color: var(--primary-dark);
}

/* ============================================
   ALERTS & WARNINGS
   ============================================ */
.warning {
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    text-align: center;
    font-size: 0.9rem;
    margin-top: 2rem;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4rem;
}

/* ============================================
   GALLERY GRID
   ============================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

main > * {
    animation: fadeIn 0.6s ease-out;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ============================================
   RESPONSIVE DESIGN - TABLETS (768px)
   ============================================ */
@media (max-width: 768px) {
    /* Navigation */
    nav {
        flex-direction: column;
        padding: 1rem;
        position: relative;
    }
    
    .logo {
        margin-bottom: 1rem;
    }
    
    .logo img {
        height: 32px;
        max-width: 150px;
    }
    
    .menu-toggle {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
    }
    
    nav ul {
        flex-direction: column;
        width: 100%;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    nav ul.active {
        max-height: 500px;
    }
    
    nav ul li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--border);
    }
    
    nav ul li a {
        display: block;
        padding: 1rem;
    }
    
    .btn-login button {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    /* Main Content */
    main {
        padding: 2rem 1rem;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    section {
        padding: 3rem 1rem !important;
    }
    
    h1 {
        font-size: 2.5rem !important;
    }
    
    h2 {
        font-size: 2rem !important;
    }
    
    /* Buttons */
    button, 
    .btn-secondary,
    input[type="submit"],
    .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem !important;
        font-size: 1rem !important;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    /* Forms */
    form {
        padding: 1.5rem !important;
    }
    
    input, 
    select, 
    textarea {
        font-size: 16px !important; /* Previne zoom no iOS */
    }
    
    /* Tables */
    table {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
    }
    
    /* Grids */
    .gallery-grid {
        grid-template-columns: 1fr !important;
    }
    
    div[style*="display: grid"] {
        grid-template-columns: 1fr !important;
    }
    
    div[style*="grid-template-columns: repeat(auto-fit"] {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE (480px)
   ============================================ */
@media (max-width: 480px) {
    .logo img {
        height: 28px;
        max-width: 120px;
    }
    
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    p {
        font-size: 0.95rem !important;
    }
    
    section {
        padding: 2rem 1rem !important;
    }
    
    .btn-login button span {
        display: none;
    }
    
    .btn-login button {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
    
    /* Esconder scroll indicator */
    div[style*="animation: bounce"] {
        display: none !important;
    }
}

/* ============================================
   LANDSCAPE MODE (MOBILE)
   ============================================ */
@media (max-width: 768px) and (orientation: landscape) {
    section[style*="min-height: 90vh"] {
        min-height: auto !important;
        padding: 2rem 1rem !important;
    }
}