:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --dark: #1f2937;
    --light: #f3f4f6;
    --white: #ffffff;
    --gray: #6b7280;
    --danger: #ef4444;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

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

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.3s;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-google {
    background: var(--white);
    color: var(--dark);
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
}

.btn-google:hover {
    background: var(--light);
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.slideshow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.slideshow-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.slideshow-card:hover {
    transform: translateY(-4px);
}

.slideshow-preview {
    height: 160px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
}

.slideshow-info {
    padding: 1rem;
}

.slideshow-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.slideshow-meta {
    color: var(--gray);
    font-size: 0.875rem;
}

.slideshow-actions {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid var(--light);
}

/* Go Page */
.go-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--dark);
    color: var(--white);
}

.qr-section {
    text-align: center;
    margin-bottom: 2rem;
}

.qr-code {
    background: var(--white);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.session-code {
    font-size: 3rem;
    font-weight: bold;
    letter-spacing: 0.5rem;
    color: var(--primary);
}

.code-input-section {
    text-align: center;
}

.code-input {
    font-size: 2rem;
    padding: 1rem;
    text-align: center;
    width: 200px;
    border: 3px solid var(--primary);
    border-radius: 12px;
    letter-spacing: 0.5rem;
    text-transform: uppercase;
}

/* Presenter Controls */
.presenter-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--dark);
    color: var(--white);
}

.presenter-header {
    padding: 1rem;
    background: rgba(0,0,0,0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.current-slide-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.current-slide {
    max-width: 100%;
    max-height: 40vh;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.notes-section {
    padding: 1rem;
    background: rgba(255,255,255,0.1);
    max-height: 25vh;
    overflow-y: auto;
}

.notes-section h3 {
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.controls-section {
    padding: 1.5rem;
    background: var(--primary);
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.control-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: var(--white);
    color: var(--primary);
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.control-btn:active {
    transform: scale(0.95);
}

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

/* Presentation Screen */
.screen-container {
    min-height: 100vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-display {
    max-width: 100%;
    max-height: 100vh;
    object-fit: contain;
}

.slide-placeholder {
    color: var(--white);
    text-align: center;
    font-size: 2rem;
}

/* Screen count badge */
.screen-count {
    background: var(--secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

/* Waiting screen */
.waiting-screen {
    text-align: center;
    color: var(--white);
}

.waiting-screen h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.waiting-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

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

/* Settings Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    color: var(--dark);
}

.modal h2 {
    margin-bottom: 1.5rem;
}

.screen-list {
    margin-bottom: 1rem;
}

.screen-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--light);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.login-card h1 {
    text-align: center;
    margin-bottom: 2rem;
}

.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--gray);
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #ddd;
}

.divider span {
    padding: 0 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .control-btn {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .session-code {
        font-size: 2rem;
        letter-spacing: 0.25rem;
    }
}
