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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
    padding: 20px;
}

.upload-container {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

/* Header */
.upload-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 30px;
    text-align: center;
}

.logo {
    height: 60px;
    width: auto;
    margin-bottom: 15px;
    /* Removed white filter that was causing blank display */
}

.upload-header h1 {
    font-size: 1.8em;
    margin-bottom: 10px;
    font-weight: 300;
}

.subtitle {
    opacity: 0.9;
    font-size: 1em;
    line-height: 1.4;
}

/* Form Container */
.upload-form-container {
    padding: 30px;
}

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

/* Upload Section */
.upload-section {
    text-align: center;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 40px 20px;
    background: rgba(102, 126, 234, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #764ba2;
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #4ecdc4;
    background: rgba(78, 205, 196, 0.1);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4em;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

.upload-area h3 {
    margin-bottom: 10px;
    color: #333;
    font-size: 1.4em;
}

.upload-area p {
    margin-bottom: 25px;
    color: #666;
    font-size: 1em;
}

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

/* Photo Preview */
.photo-preview {
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.photo-preview img {
    max-width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

/* Context Section */
.context-section {
    position: relative;
}

.context-label {
    display: block;
    margin-bottom: 15px;
}

.label-text {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.label-subtitle {
    display: block;
    font-size: 0.9em;
    color: #666;
}

.context-section textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1em;
    line-height: 1.5;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.context-section textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.char-counter {
    text-align: right;
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
}

.char-counter.warning {
    color: #ff6b6b;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    font-size: 1em;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

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

.btn-camera {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
}

.btn-gallery {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.btn-change {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-submit {
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
    font-size: 1.1em;
    padding: 15px 30px;
    width: 100%;
    position: relative;
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.btn-secondary {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 2px solid #667eea;
}

.btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-submit:not(:disabled):hover {
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

/* Submit Section */
.submit-section {
    text-align: center;
}

.submit-note {
    margin-top: 15px;
    font-size: 0.9em;
    color: #666;
    line-height: 1.4;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 50px 30px;
    animation: bounceIn 0.8s ease-out;
}

.success-icon {
    font-size: 5em;
    margin-bottom: 20px;
    animation: bounce 1s ease-out;
}

.success-message h2 {
    margin-bottom: 15px;
    color: #4ecdc4;
    font-size: 2em;
}

.success-message p {
    margin-bottom: 30px;
    color: #666;
    font-size: 1.1em;
    line-height: 1.5;
}

.success-message .btn {
    margin: 5px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #4ecdc4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-overlay p {
    color: white;
    font-size: 1.2em;
    font-weight: 500;
}

/* Tips Section */
.tips-section {
    max-width: 600px;
    margin: 30px auto 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
}

.tips-section h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.3em;
}

.tips-list {
    list-style: none;
    display: grid;
    gap: 10px;
}

.tips-list li {
    padding: 10px 15px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    border-left: 4px solid #667eea;
    font-size: 0.95em;
    line-height: 1.4;
}

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

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-30px);
    }
    80% {
        transform: translateY(-15px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .upload-container {
        margin: 0;
    }
    
    .upload-header {
        padding: 20px;
    }
    
    .upload-header h1 {
        font-size: 1.5em;
    }
    
    .upload-form-container {
        padding: 20px;
    }
    
    .upload-area {
        padding: 30px 15px;
    }
    
    .upload-icon {
        font-size: 3em;
    }
    
    .upload-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .tips-section {
        margin: 20px auto 0;
        padding: 20px;
    }
    
    .success-message {
        padding: 30px 20px;
    }
    
    .success-icon {
        font-size: 4em;
    }
}

@media (max-width: 480px) {
    .upload-header h1 {
        font-size: 1.3em;
    }
    
    .subtitle {
        font-size: 0.9em;
    }
    
    .upload-form-container {
        padding: 15px;
    }
    
    .upload-area {
        padding: 25px 10px;
    }
    
    .context-section textarea {
        min-height: 100px;
    }
    
    .tips-section {
        padding: 15px;
    }
    
    .tips-list li {
        font-size: 0.9em;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .upload-container {
        background: rgba(30, 30, 30, 0.95);
        color: #e0e0e0;
    }
    
    .upload-area {
        background: rgba(102, 126, 234, 0.1);
        border-color: #667eea;
    }
    
    .context-section textarea {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: #e0e0e0;
    }
    
    .context-section textarea::placeholder {
        color: rgba(255, 255, 255, 0.6);
    }
    
    .tips-section {
        background: rgba(30, 30, 30, 0.9);
        color: #e0e0e0;
    }
}
