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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #e0e0e0;
}

/* Login Page Styles */
.login-page {
    background: #1a0000;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(139, 0, 0, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(100, 0, 0, 0.2) 0%, transparent 50%);
    padding: 20px;
}

.login-container {
    background: rgba(20, 0, 0, 0.95);
    border: 2px solid #5c0000;
    padding: 40px;
    border-radius: 5px;
    box-shadow: 0 0 30px rgba(139, 0, 0, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    width: 100%;
}

.login-container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #8b0000;
    text-shadow: 0 0 10px rgba(139, 0, 0, 0.8), 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 700;
    letter-spacing: 2px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-form .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #d0a0a0;
    font-weight: 500;
    font-size: 1em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #5c0000;
    border-radius: 3px;
    font-size: 1em;
    font-family: inherit;
    background: rgba(10, 0, 0, 0.8);
    color: #e0e0e0;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    outline: none;
    border-color: #8b0000;
    box-shadow: 0 0 10px rgba(139, 0, 0, 0.5), inset 0 0 5px rgba(139, 0, 0, 0.2);
}

/* Form Page Styles */
.form-page {
    background: #0a0000;
    background-image: url('background.jpg'); /* Background image to be added later */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    padding: 20px;
    min-height: 100vh;
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(20, 0, 0, 0.92);
    border: 2px solid #5c0000;
    padding: 40px;
    border-radius: 5px;
    box-shadow: 0 0 40px rgba(139, 0, 0, 0.4), inset 0 0 30px rgba(0, 0, 0, 0.6);
}

.form-header {
    margin-bottom: 30px;
    text-align: center;
}

.form-header h1 {
    color: #8b0000;
    margin-bottom: 20px;
    font-size: 2em;
    text-shadow: 0 0 15px rgba(139, 0, 0, 0.9), 2px 2px 4px rgba(0, 0, 0, 0.9);
    font-weight: 700;
    letter-spacing: 1px;
}

.description {
    color: #d0a0a0;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 1.1em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.character-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.form-section {
    border-bottom: 2px solid #5c0000;
    padding-bottom: 30px;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h2 {
    color: #8b0000;
    margin-bottom: 20px;
    font-size: 1.3em;
    text-shadow: 0 0 10px rgba(139, 0, 0, 0.7), 1px 1px 3px rgba(0, 0, 0, 0.8);
    font-weight: 600;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #d0a0a0;
    font-weight: 500;
    font-size: 1em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #5c0000;
    border-radius: 3px;
    font-size: 1em;
    font-family: inherit;
    background: rgba(10, 0, 0, 0.8);
    color: #e0e0e0;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8b0000;
    box-shadow: 0 0 10px rgba(139, 0, 0, 0.5), inset 0 0 5px rgba(139, 0, 0, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    margin-top: 30px;
    text-align: center;
}

.btn-primary,
.btn-submit {
    background: #5c0000;
    color: #e0e0e0;
    padding: 15px 40px;
    border: 2px solid #8b0000;
    border-radius: 3px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.4), inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover,
.btn-submit:hover {
    background: #8b0000;
    border-color: #a00000;
    box-shadow: 0 0 25px rgba(139, 0, 0, 0.7), inset 0 0 15px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.btn-primary:active,
.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.error-message {
    color: #ff4444;
    text-align: center;
    margin-top: 10px;
    font-size: 0.9em;
    display: none;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.8), 1px 1px 2px rgba(0, 0, 0, 0.8);
}

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

.submit-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 3px;
    text-align: center;
    font-weight: 500;
    display: none;
    border: 2px solid;
}

.submit-message.success {
    display: block;
    background-color: rgba(20, 60, 20, 0.8);
    color: #90ee90;
    border-color: #006600;
    text-shadow: 0 0 10px rgba(144, 238, 144, 0.5), 1px 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 15px rgba(0, 100, 0, 0.4);
}

.submit-message.error {
    display: block;
    background-color: rgba(60, 20, 20, 0.8);
    color: #ff6666;
    border-color: #8b0000;
    text-shadow: 0 0 10px rgba(255, 102, 102, 0.6), 1px 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.4);
}

/* Music Controls */
.music-controls {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(20, 0, 0, 0.9);
    border: 2px solid #5c0000;
    padding: 12px 18px;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.music-btn {
    background: #5c0000;
    border: 2px solid #8b0000;
    color: #e0e0e0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 10px rgba(139, 0, 0, 0.4), inset 0 0 5px rgba(0, 0, 0, 0.3);
}

.music-btn:hover {
    background: #8b0000;
    border-color: #a00000;
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.7), inset 0 0 8px rgba(0, 0, 0, 0.4);
    transform: scale(1.05);
}

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

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-slider {
    width: 100px;
    height: 3px;
    background: rgba(30, 0, 0, 0.6);
    border: none;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.volume-slider:hover {
    opacity: 1;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #5c0000;
    border: 1px solid #3a0000;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.volume-slider::-webkit-slider-thumb:hover {
    background: #6b0000;
    border-color: #4a0000;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #5c0000;
    border: 1px solid #3a0000;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.volume-slider::-moz-range-thumb:hover {
    background: #6b0000;
    border-color: #4a0000;
}

.volume-value {
    color: #8b6b6b;
    font-size: 12px;
    font-weight: 400;
    min-width: 35px;
    text-align: right;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-container {
        padding: 20px;
    }

    .form-header h1 {
        font-size: 1.5em;
    }

    .form-section h2 {
        font-size: 1.1em;
    }

    .music-controls {
        bottom: 15px;
        left: 15px;
        padding: 10px 15px;
        gap: 12px;
    }

    .music-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .volume-slider {
        width: 100px;
    }

    .volume-value {
        font-size: 12px;
        min-width: 35px;
    }
}

/* Admin Pages Styles */
.admin-page {
    background: #0a0000;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(139, 0, 0, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(100, 0, 0, 0.15) 0%, transparent 50%);
    padding: 20px;
    min-height: 100vh;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(20, 0, 0, 0.92);
    border: 2px solid #5c0000;
    padding: 40px;
    border-radius: 5px;
    box-shadow: 0 0 40px rgba(139, 0, 0, 0.4), inset 0 0 30px rgba(0, 0, 0, 0.6);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #5c0000;
}

.admin-header h1 {
    color: #8b0000;
    text-shadow: 0 0 15px rgba(139, 0, 0, 0.9), 2px 2px 4px rgba(0, 0, 0, 0.9);
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0;
}

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

.btn-logout,
.btn-back {
    background: #5c0000;
    color: #e0e0e0;
    padding: 10px 20px;
    border: 2px solid #8b0000;
    border-radius: 3px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 10px rgba(139, 0, 0, 0.4), inset 0 0 5px rgba(0, 0, 0, 0.3);
}

.btn-logout:hover,
.btn-back:hover {
    background: #8b0000;
    border-color: #a00000;
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.7), inset 0 0 8px rgba(0, 0, 0, 0.4);
}

.btn-back {
    background: rgba(92, 0, 0, 0.5);
}

/* Admin Stats */
.admin-stats {
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(10, 0, 0, 0.6);
    border: 1px solid #5c0000;
    padding: 20px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-label {
    color: #d0a0a0;
    font-size: 0.9em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.stat-value {
    color: #8b0000;
    font-size: 2em;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(139, 0, 0, 0.7), 1px 1px 3px rgba(0, 0, 0, 0.8);
}

/* Characters List */
.characters-list-container {
    margin-top: 30px;
}

.characters-list-container h2 {
    color: #8b0000;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(139, 0, 0, 0.7), 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.characters-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.character-card {
    background: rgba(10, 0, 0, 0.6);
    border: 2px solid #5c0000;
    padding: 20px;
    border-radius: 5px;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.character-card:hover {
    border-color: #8b0000;
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.5);
    transform: translateY(-2px);
}

.character-card-header {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.character-card-header h3 {
    color: #8b0000;
    margin: 0;
    font-size: 1.2em;
    text-shadow: 0 0 10px rgba(139, 0, 0, 0.7), 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.character-user {
    color: #d0a0a0;
    font-size: 0.85em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.character-card-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.character-date {
    color: #8b6b6b;
    font-size: 0.8em;
}

.btn-view-character {
    background: #5c0000;
    color: #e0e0e0;
    padding: 10px 20px;
    border: 2px solid #8b0000;
    border-radius: 3px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 10px rgba(139, 0, 0, 0.4), inset 0 0 5px rgba(0, 0, 0, 0.3);
    margin-top: auto;
}

.btn-view-character:hover {
    background: #8b0000;
    border-color: #a00000;
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.7), inset 0 0 8px rgba(0, 0, 0, 0.4);
}

.loading,
.no-characters,
.error {
    text-align: center;
    padding: 40px;
    color: #d0a0a0;
    font-size: 1.1em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.error {
    color: #ff6666;
}

/* Character Details View */
.character-view-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #5c0000;
}

.character-view-header h2 {
    color: #8b0000;
    margin-bottom: 15px;
    text-shadow: 0 0 15px rgba(139, 0, 0, 0.9), 2px 2px 4px rgba(0, 0, 0, 0.9);
    font-weight: 700;
}

.character-meta {
    color: #d0a0a0;
    margin: 8px 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.character-meta strong {
    color: #8b0000;
}

.character-answers {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.answer-section {
    background: rgba(10, 0, 0, 0.4);
    border: 1px solid #5c0000;
    padding: 20px;
    border-radius: 5px;
}

.answer-section h3 {
    color: #8b0000;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #5c0000;
    text-shadow: 0 0 10px rgba(139, 0, 0, 0.7), 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.answer-item {
    margin-bottom: 20px;
}

.answer-item:last-child {
    margin-bottom: 0;
}

.answer-item label {
    display: block;
    color: #d0a0a0;
    font-weight: 600;
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.answer-item p {
    color: #e0e0e0;
    line-height: 1.6;
    padding: 12px;
    background: rgba(10, 0, 0, 0.6);
    border-left: 3px solid #8b0000;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Responsive Admin */
@media (max-width: 768px) {
    .admin-container {
        padding: 20px;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

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

    .characters-list {
        grid-template-columns: 1fr;
    }
}
