/**
 * Main Stylesheet - Rota Oculta do Violão
 * Global styles, typography, layout, and colors
 */

/* ===== CSS Variables ===== */
:root {
    /* Colors */
    --primary-red: #FF3131;
    --primary-hover: #F3CD05;
    --secondary-blue: #36688D;
    --accent-yellow: #FFC445;
    --dark: #3C3C3C;
    --black: #000000;
    --white: #FFFFFF;
    --gray-light: #F5F5F5;
    --gray-medium: #CCCCCC;
    --gray-dark: #666666;

    /* Typography */
    --font-family: 'Montserrat', sans-serif;
    --font-weight-regular: 400;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Font Sizes */
    --font-xs: 0.8rem;
    --font-sm: 0.9rem;
    --font-base: 1rem;
    --font-lg: 1.125rem;
    --font-xl: 1.25rem;
    --font-2xl: 1.5rem;
    --font-3xl: 2rem;
    --font-4xl: 2.5rem;

    /* Spacing */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 40px;
    --spacing-xl: 80px;

    /* Borders */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-base);
    font-weight: var(--font-weight-regular);
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
}

h1 { font-size: var(--font-4xl); }
h2 { font-size: var(--font-3xl); }
h3 { font-size: var(--font-2xl); }
h4 { font-size: var(--font-xl); }
h5 { font-size: var(--font-lg); }
h6 { font-size: var(--font-base); }

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--primary-red);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

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

button {
    font-family: var(--font-family);
    cursor: pointer;
    border: none;
    outline: none;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===== Loading Spinner ===== */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--gray-light);
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Header ===== */
.header {
    background-color: var(--accent-yellow);
    padding: var(--spacing-md) 0;
    box-shadow: var(--shadow-md);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-logo {
    width: 170px;
    height: 110px;
    object-fit: contain;
}

/* ===== Main Content ===== */
.main-content {
    min-height: calc(100vh - 200px);
}

/* ===== Hero Section ===== */
.hero-section {
    background-color: var(--white);
    padding: var(--spacing-xl) 0;
}

.hero-content {
    text-align: center;
}

.hero-title {
    font-size: var(--font-4xl);
    color: var(--dark);
    margin-bottom: var(--spacing-md);
}

.hero-subtitle {
    font-size: var(--font-xl);
    color: var(--gray-dark);
    margin-bottom: var(--spacing-lg);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto var(--spacing-lg);
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    aspect-ratio: 16 / 9;
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform var(--transition-normal);
}

.play-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.availability-note {
    font-size: var(--font-sm);
    color: var(--gray-dark);
    font-style: italic;
    margin-top: var(--spacing-md);
}

/* ===== About Section ===== */
.about-section {
    background-color: var(--dark);
    color: var(--white);
    padding: var(--spacing-xl) 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.about-text {
    font-size: var(--font-lg);
    line-height: 1.8;
}

.about-text h2 {
    color: var(--accent-yellow);
    margin-bottom: var(--spacing-md);
}

.about-image {
    text-align: center;
}

.teacher-image {
    width: 100%;
    max-width: 400px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
}

/* ===== Footer ===== */
.footer {
    background-color: var(--black);
    color: var(--white);
    padding: var(--spacing-lg) 0;
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-copyright {
    font-size: var(--font-sm);
    margin: 0;
}

.footer-contact {
    font-size: var(--font-sm);
    margin: 0;
}

.footer-contact a {
    color: var(--accent-yellow);
}

.footer-contact a:hover {
    color: var(--primary-hover);
}

/* ===== Fixed CTA Button ===== */
.fixed-cta-button {
    position: fixed;
    bottom: var(--spacing-md);
    right: var(--spacing-md);
    background-color: var(--primary-red);
    color: var(--white);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius-full);
    font-size: var(--font-lg);
    font-weight: var(--font-weight-bold);
    box-shadow: var(--shadow-xl);
    transition: all var(--transition-normal);
    z-index: 1000;
}

.fixed-cta-button:hover {
    background-color: var(--primary-hover);
    color: var(--dark);
    transform: scale(1.05);
}

/* ===== Video Page Styles ===== */
.video-page {
    background-color: var(--black);
    color: var(--white);
}

.video-main {
    padding: var(--spacing-lg) 0;
    min-height: calc(100vh - 200px);
}

.video-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.video-title {
    text-align: center;
    color: var(--white);
    margin-bottom: var(--spacing-lg);
}

.video-player-wrapper {
    position: relative;
    max-width: 1000px;
    margin: 0 auto var(--spacing-lg);
    background-color: var(--black);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.video-player-wrapper:hover .custom-controls {
    opacity: 1;
}

.control-button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    transition: transform var(--transition-fast);
}

.control-button:hover {
    transform: scale(1.1);
}

.progress-bar-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.progress-bar {
    height: 6px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius-full);
    overflow: visible;
    cursor: pointer;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary-red), var(--primary-hover));
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
}

.progress-percentage {
    position: absolute;
    top: -25px;
    right: 0;
    transform: translateX(50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: var(--white);
    padding: 2px 8px;
    border-radius: var(--border-radius-sm);
    font-size: var(--font-xs);
    font-weight: var(--font-weight-semibold);
    white-space: nowrap;
    pointer-events: none;
}

.time-display {
    font-size: var(--font-xs);
    color: var(--white);
}

.video-description {
    text-align: center;
    color: var(--gray-medium);
    max-width: 800px;
    margin: 0 auto;
}

/* ===== Auth Error Container ===== */
.auth-error-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-lg);
}

.auth-error-container h1 {
    color: var(--primary-red);
    margin-bottom: var(--spacing-md);
}

.auth-error-container p {
    color: var(--gray-dark);
    font-size: var(--font-lg);
}


/* ===== Hidden Content Sections ===== */
.content-section,
.hidden-content {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.content-section.visible,
.hidden-content.visible {
    display: block;
    opacity: 1;
}

/* ===== CTA Button Hidden State ===== */
.cta-button-hidden {
    display: none !important;
    opacity: 0;
}

.cta-button {
    transition: opacity 0.5s ease-in-out;
}
