/* ===== CHARACTER CREATION PAGE STYLING ===== */
/* Skeuomorphic design matching store page */

/* Character Creation Header */
.character-creation-header {
    background: linear-gradient(145deg, #f0f2f5, #e8eaed, #ddd);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.25),
        0 5px 15px rgba(0, 0, 0, 0.12),
        inset 0 3px 6px rgba(255, 255, 255, 0.9),
        inset 0 -3px 6px rgba(0, 0, 0, 0.15),
        inset 1px 0 2px rgba(255, 255, 255, 0.7),
        inset -1px 0 2px rgba(0, 0, 0, 0.1);
    border: 3px solid #c0c4c8;
    position: relative;
}

.character-creation-header::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    height: 3px;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), rgba(255,255,255,0.4), rgba(255,255,255,0.8));
    border-radius: 18px 18px 0 0;
}

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

.title-section {
    flex: 1;
    min-width: 300px;
}

.creation-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-family: 'Baloo 2', cursive;
}

.creation-subtitle {
    font-size: 1.2rem;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

/* Character Creation Container */
.character-creation-container {
    background: linear-gradient(145deg, #ffffff, #f5f7fa, #e8eaed);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.25),
        0 5px 15px rgba(0, 0, 0, 0.12),
        inset 0 3px 6px rgba(255, 255, 255, 0.9),
        inset 0 -3px 6px rgba(0, 0, 0, 0.15),
        inset 1px 0 2px rgba(255, 255, 255, 0.7),
        inset -1px 0 2px rgba(0, 0, 0, 0.1);
    border: 3px solid #c0c4c8;
    position: relative;
    margin-bottom: 30px;
}

.character-creation-container::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    height: 3px;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), rgba(255,255,255,0.4), rgba(255,255,255,0.8));
    border-radius: 18px 18px 0 0;
}

/* Form Sections */
.form-section {
    margin-bottom: 35px;
    padding: 25px;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 16px;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.1),
        0 3px 8px rgba(0, 0, 0, 0.08),
        inset 0 2px 4px rgba(255, 255, 255, 0.9),
        inset 0 -2px 4px rgba(0, 0, 0, 0.08),
        inset 1px 0 2px rgba(255, 255, 255, 0.7),
        inset -1px 0 2px rgba(0, 0, 0, 0.06);
    border: 2px solid #d1d5db;
    position: relative;
}

.form-section:last-of-type {
    margin-bottom: 0;
}

.section-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Baloo 2', cursive;
}

.section-title .material-icons {
    color: #4a90e2;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.section-description {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
    font-weight: 400;
}

/* Image Upload Section */
.image-section {
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
}

.image-upload-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-preview-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 500px;
}

.image-preview {
    width: 100%;
    max-width: 400px;
    height: 400px;
    border-radius: 16px;
    background: linear-gradient(145deg, #f0f2f5, #e8eaed);
    border: 3px dashed #c0c4c8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 
        inset 0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 -2px 4px rgba(255, 255, 255, 0.8);
    position: relative;
}

.image-preview img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    max-width: 100% !important;
    max-height: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
}

.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: #94a3b8;
    font-size: 1.1rem;
    font-weight: 500;
}

.preview-placeholder .material-icons {
    font-size: 4rem;
    opacity: 0.5;
}

.upload-btn {
    padding: 14px 28px;
    background: linear-gradient(145deg, #fbbf24, #f59e0b, #ec4899, #db2777);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 
        0 8px 16px rgba(236, 72, 153, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid #db2777;
    transition: all 0.3s ease;
    font-family: 'Baloo 2', cursive;
    text-decoration: none;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: auto;
    position: relative;
    z-index: 10;
}

.upload-btn:hover {
    background: linear-gradient(145deg, #fcd34d, #fbbf24, #f472b6, #ec4899);
    box-shadow: 
        0 10px 20px rgba(236, 72, 153, 0.5),
        0 5px 10px rgba(0, 0, 0, 0.25),
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.upload-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 4px 8px rgba(236, 72, 153, 0.4),
        inset 0 3px 6px rgba(0, 0, 0, 0.2);
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-label .material-icons {
    font-size: 1.2rem;
    color: #4a90e2;
}

.form-input,
.form-textarea {
    padding: 14px 18px;
    background: linear-gradient(145deg, #ffffff, #f5f7fa);
    border: 2px solid #d1d5db;
    border-radius: 12px;
    font-size: 1rem;
    color: #1e293b;
    font-family: inherit;
    transition: all 0.3s ease;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.05),
        inset 0 -1px 2px rgba(255, 255, 255, 0.8);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #4a90e2;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    box-shadow: 
        0 0 0 3px rgba(59, 130, 246, 0.1),
        inset 0 2px 4px rgba(0, 0, 0, 0.05),
        inset 0 -1px 2px rgba(255, 255, 255, 0.8);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* Submit Section */
.submit-section {
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    border: 2px solid #d1d5db;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.cancel-btn,
.submit-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-family: 'Baloo 2', cursive;
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.15),
        0 3px 6px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.8),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid;
}

.cancel-btn {
    background: linear-gradient(145deg, #f0f2f5, #e8eaed);
    color: #64748b;
    border-color: #c0c4c8;
}

.cancel-btn:hover {
    background: linear-gradient(145deg, #e8eaed, #ddd);
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 0.8),
        inset 0 -2px 4px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.cancel-btn:active {
    transform: translateY(0);
    box-shadow: 
        inset 0 3px 6px rgba(0, 0, 0, 0.2),
        inset 0 -1px 2px rgba(255, 255, 255, 0.5);
}

.submit-btn {
    background: linear-gradient(145deg, #10b981, #059669, #047857);
    color: white;
    border-color: #047857;
}

.submit-btn:hover {
    background: linear-gradient(145deg, #34d399, #10b981, #059669);
    box-shadow: 
        0 8px 16px rgba(16, 185, 129, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 4px 8px rgba(16, 185, 129, 0.3),
        inset 0 3px 6px rgba(0, 0, 0, 0.2);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Form Message */
.form-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.8),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid;
}

.form-message.success {
    background: linear-gradient(145deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border-color: #10b981;
}

.form-message.error {
    background: linear-gradient(145deg, #fee2e2, #fecaca);
    color: #991b1b;
    border-color: #ef4444;
}

.form-message.info {
    background: linear-gradient(145deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    border-color: #3b82f6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .character-creation-container {
        padding: 25px 20px;
    }
    
    .form-section {
        padding: 20px 15px;
    }
    
    .creation-title {
        font-size: 2.2rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .cancel-btn,
    .submit-btn {
        width: 100%;
        justify-content: center;
    }
    
    .image-preview {
        height: 300px;
    }
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f4f6;
    border-top-color: #4a90e2;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

/* Character Card Hover Effects */
.character-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Improved Image Preview */
.image-preview img {
    transition: transform 0.3s ease;
}

.image-preview:hover img {
    transform: scale(1.02);
}

/* Form Input Focus States */
.form-input:focus,
.form-textarea:focus {
    transform: scale(1.01);
    transition: all 0.2s ease;
}

/* Success Animation */
@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.form-message.success {
    animation: successPulse 0.5s ease;
}

