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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

#app {
    min-height: 100vh;
    position: relative;
}

/* Language Switcher */
.language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lang-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.lang-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.lang-btn.active {
    background: #667eea;
    color: white;
}

/* Page Management */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Login Page */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-container h1 {
    margin-bottom: 30px;
    color: #667eea;
    text-align: center;
    font-size: 24px;
}

.auth-switch {
    margin-top: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.auth-switch a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Form Sections */
.form-section {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.form-section h3 {
    margin: 0 0 8px 0;
    color: #667eea;
    font-size: 18px;
}

.form-hint {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
}

.checkbox-group {
    margin-bottom: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    cursor: pointer;
}

.optional-label {
    color: #999;
    font-weight: normal;
    font-size: 14px;
}

.info-icon {
    display: inline-block;
    margin-left: 6px;
    cursor: help;
    color: #667eea;
    font-size: 16px;
}

.info-icon:hover {
    color: #764ba2;
}

/* Dashboard Page */
.dashboard-header {
    background: white;
    padding: 20px 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header h1 {
    color: #667eea;
    font-size: 28px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.events-list {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.event-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.event-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 16px;
}

.event-card-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.event-card-code {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

.event-card-description {
    color: #666;
    margin-bottom: 16px;
    line-height: 1.5;
}

.event-card-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #667eea;
}

/* Event Creation Page */
.page-header {
    background: white;
    padding: 20px 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

.page-header h1 {
    color: #667eea;
    font-size: 24px;
}

.event-form {
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Event Detail Page */
.event-detail {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.event-info {
    background: white;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.event-info-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 2px solid #eee;
}

.event-info-title {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.event-info-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
}

.event-info-meta {
    display: flex;
    gap: 24px;
    color: #999;
    font-size: 14px;
}

.event-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.stat-card-value {
    font-size: 32px;
    font-weight: 700;
}

.stat-card-unit {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 4px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #667eea;
}

textarea {
    resize: vertical;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #e0e0e0;
    color: #666;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

button[type="submit"] {
    width: 100%;
    margin-top: 10px;
}

/* Messages */
.error-message {
    color: #e74c3c;
    background: #fdeaea;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    display: none;
}

.error-message.show {
    display: block;
}

.success-message {
    color: #27ae60;
    background: #eafaf1;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: white;
    font-size: 18px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .event-card-stats {
        grid-template-columns: 1fr;
    }

    .event-stats-grid {
        grid-template-columns: 1fr;
    }

    .language-switcher {
        top: 10px;
        right: 10px;
    }

    .login-container {
        margin: 60px 20px;
    }
}
