/* Font Face Declarations */
@font-face {
    font-family: 'Libre Baskerville';
    src: url('LibreBaskerville-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
}

@font-face {
    font-family: 'Libre Baskerville';
    src: url('LibreBaskerville-Italic-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: italic;
}

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

body {
    font-family: 'Libre Baskerville', serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* Header */
.header {
    background-color: #3d3630;
    color: #f5f5f5;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 2px;
}

.language-toggle {
    display: flex;
    align-items: center;
}

.lang-btn {
    background-color: #a0826d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Libre Baskerville', serif;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.lang-btn:hover {
    background-color: #8a6f5a;
}

.lang-btn #currentLang {
    font-weight: bold;
    color: #fff;
}

.lang-btn #otherLang {
    opacity: 0.7;
}

/* Navigation */
.nav {
    background-color: #4a4238;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-link {
    color: #f5f5f5;
    text-decoration: none;
    font-size: 1rem;
    padding: 8px 16px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background-color: #a0826d;
}

/* Sections */
.section {
    padding: 60px 0;
    background-color: #f5f5f5;
}

.section-alt {
    background-color: #e8ddd1;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 15px;
    font-weight: 600;
    color: #2d2520;
}

.section-subtitle {
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 20px;
    color: #555;
    font-weight: 500;
}

.description-text {
    max-width: 900px;
    margin: 0 auto 30px;
    padding: 25px;
    background-color: #f9f7f5;
    border-left: 4px solid #a0826d;
    border-radius: 8px;
}

.description-text p {
    color: #5c4a3a;
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 15px;
    text-align: justify;
}

.description-text p:last-child {
    margin-bottom: 0;
}

.instruction-text {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
    font-size: 1rem;
}

/* Payment Section */
.payment-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.card {
    background: white;
    border: 2px solid #d0c4b8;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-align: center;
    color: #555;
    font-weight: 600;
}

.qr-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.qr-code-area {
    border: 2px dashed #d0c4b8;
    border-radius: 10px;
    padding: 20px;
}

.qr-code-image {
    width: 250px;
    height: 250px;
    object-fit: contain;
    display: block;
    border-radius: 5px;
}

.card-instruction {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-top: 20px;
    line-height: 1.5;
}

.upload-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    margin: 30px 0;
}

.file-format {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
}

.slip-preview {
    margin-top: 20px;
    border: 2px solid #d0c4b8;
    border-radius: 10px;
    padding: 10px;
    background-color: #f9f9f9;
}

.slip-preview img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 5px;
}

.amount-input-area {
    margin: 20px 0;
    text-align: center;
}

.amount-input-area label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 0.95rem;
}

.amount-input-area input {
    width: 100%;
    max-width: 250px;
    padding: 10px;
    border: 1px solid #d0c4b8;
    border-radius: 8px;
    font-family: 'Libre Baskerville', serif;
    font-size: 1rem;
    text-align: center;
    margin-bottom: 10px;
}

.amount-input-area input:focus {
    outline: none;
    border-color: #a0826d;
    box-shadow: 0 0 0 3px rgba(160, 130, 109, 0.1);
}

.payment-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

.payment-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.payment-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-family: 'Libre Baskerville', serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

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

.btn-primary:hover {
    background-color: #8a6f5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-secondary {
    background-color: #a0826d;
    color: white;
    padding: 8px 20px;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background-color: #8a6f5a;
}

.btn-full {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
}

.btn-upload {
    min-width: 200px;
}

/* Tutorial Section */
.tutorial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.tutorial-grid-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

.tutorial-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.tutorial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.tutorial-title {
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 20px;
    color: #555;
    font-weight: 600;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #d0c4b8;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.video-placeholder:hover {
    background-color: #c0b4a8;
}

.play-icon {
    width: 60px;
    height: 60px;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.video-placeholder:hover .play-icon {
    opacity: 1;
    transform: scale(1.1);
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    background-color: #000;
    margin-bottom: 15px;
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: contain;
}

/* Form Section */
.form-container {
    max-width: 500px;
    margin: 0 auto;
}

.account-form {
    background: white;
    border: 2px solid #d0c4b8;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #d0c4b8;
    border-radius: 8px;
    font-family: 'Libre Baskerville', serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #a0826d;
    box-shadow: 0 0 0 3px rgba(160, 130, 109, 0.1);
}

.form-group input[type="password"] {
    letter-spacing: 2px;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px 10px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.toggle-password:hover {
    opacity: 1;
}

.account-created-message {
    margin-top: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
    border-radius: 15px;
    text-align: center;
    animation: slideIn 0.5s ease-out;
}

.success-icon {
    width: 60px;
    height: 60px;
    background-color: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto 20px;
    animation: scaleIn 0.5s ease-out;
}

.account-created-message h3 {
    color: #155724;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.account-username {
    color: #155724;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.video-quota {
    color: #155724;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.video-quota strong {
    font-size: 1.2rem;
    color: #0c5c24;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

/* Upload Video Section */
.upload-video-section {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.upload-buttons {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.upload-instruction {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.video-quota-display {
    background: white;
    padding: 15px 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.video-quota-display p {
    font-size: 1.1rem;
    color: #555;
    margin: 0;
}

.video-quota-display strong {
    font-size: 1.5rem;
    color: #a0826d;
}

.uploaded-videos-list {
    margin-top: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.uploaded-video-item {
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.uploaded-video-item .video-name {
    font-weight: 500;
    color: #333;
}

.uploaded-video-item .video-status {
    color: #28a745;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background-color: #3d3630;
    color: #f5f5f5;
    padding: 30px 0;
    text-align: center;
    margin-top: 60px;
}

.footer p {
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
    }
    
    .payment-section {
        grid-template-columns: 1fr;
    }
    
    .tutorial-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .tutorial-grid-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .nav-list {
        gap: 15px;
    }
    
    .upload-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-upload {
        width: 100%;
        max-width: 250px;
    }
    
    .account-form {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.4rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .tutorial-grid,
    .tutorial-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: fadeIn 0.6s ease-out;
}

/* Success/Error Messages */
.message {
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    font-weight: 500;
}

.message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ==================== AUTHENTICATION STYLES ==================== */

/* Header Right Section */
.header-right {
    display: flex;
    align-items: center;
}

/* Upload Authentication Form */
.upload-auth-form {
    max-width: 500px;
    margin: 0 auto 25px;
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.upload-auth-form .form-group {
    margin-bottom: 20px;
}

.upload-auth-form .form-group:last-child {
    margin-bottom: 0;
}

.upload-auth-form label {
    display: block;
    margin-bottom: 8px;
    color: #5c4a3a;
    font-weight: 600;
    font-size: 0.95rem;
}

.upload-auth-form input[type="text"],
.upload-auth-form input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.upload-auth-form input:focus {
    outline: none;
    border-color: #a0826d;
}

.auth-error-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

/* Video Protection Overlay */
.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
    border-radius: 8px;
}

.video-play-overlay:hover {
    background: rgba(0, 0, 0, 0.75);
}

.play-icon {
    width: 80px;
    height: 80px;
    background: rgba(160, 130, 109, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    transition: transform 0.3s ease;
}

.video-play-overlay:hover .play-icon {
    transform: scale(1.1);
}

.video-container {
    position: relative;
}

/* ==================== MODAL STYLES ==================== */

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 30px;
    border: 1px solid #888;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    line-height: 20px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #000;
}

.modal-content h2 {
    color: #5c4a3a;
    margin-top: 0;
}

.modal-content .account-form {
    margin-top: 20px;
}

/* Pulse animation for create account button */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Login Error */
.login-error {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 10px;
    text-align: center;
}

/* New User Message */
.new-user-message {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    text-align: center;
}

.new-user-message p {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

.create-account-link {
    color: #a0826d;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.create-account-link:hover {
    color: #8b6f5c;
    text-decoration: underline;
}

/* Button Small */
.btn-small {
    padding: 5px 12px;
    font-size: 0.85rem;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* ==================== ADMIN PANEL STYLES ==================== */

.admin-controls {
    margin-bottom: 20px;
    text-align: center;
}

/* User Table */
.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.user-table thead {
    background-color: #a0826d;
    color: white;
}

.user-table th,
.user-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.user-table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.user-table tbody tr:hover {
    background-color: #f8f9fa;
}

.user-table tbody tr:last-child td {
    border-bottom: none;
}

.user-table td:last-child {
    text-align: center;
}

/* User List Container */
.user-list {
    min-height: 200px;
}

.user-list p {
    text-align: center;
    color: #666;
    padding: 40px 20px;
}

/* Responsive Admin Panel */
@media (max-width: 768px) {
    .header-right {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    #userInfo {
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }
    
    .user-table {
        font-size: 0.85rem;
    }
    
    .user-table th,
    .user-table td {
        padding: 10px 8px;
    }
    
    .btn-small {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .user-table {
        font-size: 0.75rem;
    }
    
    .user-table th,
    .user-table td {
        padding: 8px 5px;
    }
}

