/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.container {
    width: 100%;
    max-width: 500px;
}

.form-container {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.form-header::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.form-header h1 {
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.form-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.alert-error {
    background: #fee;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.alert-success {
    background: #f0fff4;
    color: #2f855a;
    border: 1px solid #9ae6b4;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Form */
.register-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input[type="file"] {
    padding: 0.5rem;
    border: 2px dashed #e2e8f0;
    background: #f8fafc;
    cursor: pointer;
}

.form-group input[type="file"]:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.form-group small {
    color: #666;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Button */
.btn-register {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-register::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 ease;
}

.btn-register:hover::before {
    left: 100%;
}

.btn-register:active {
    transform: translateY(0);
}

/* Button states */
.btn-register:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-register:disabled:hover {
    background: #ccc;
    transform: none;
    box-shadow: none;
}

/* Form footer */
.form-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.form-footer p {
    color: #666;
    margin-bottom: 1rem;
}

.form-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.form-footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.back-home {
    display: inline-block;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
}

.back-home:hover {
    color: #667eea;
    background: #e2e8f0;
    border-color: #667eea;
    transform: translateY(-1px);
}

/* Responsive design */
@media (max-width: 768px) {
    .form-container {
        padding: 2rem 1.5rem;
    }
    
    .form-header h1 {
        font-size: 2rem;
    }
    
    .form-header p {
        font-size: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1rem 0.5rem;
    }
    
    .form-container {
        padding: 1.5rem 1rem;
    }
    
    .form-header h1 {
        font-size: 1.8rem;
    }
    
    .btn-register {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* Custom file input styling */
.form-group input[type="file"]::-webkit-file-upload-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 1rem;
    font-weight: 500;
}

.form-group input[type="file"]::-webkit-file-upload-button:hover {
    background: #5a6fd8;
}

/* Select dropdown styling */
.form-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
    transition: all 0.3s ease;
}

.form-group select:hover {
    border-color: #667eea;
    background-color: #f8fafc;
}

/* Focus states for accessibility */
.form-group input:focus,
.form-group select:focus,
.btn-register:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* File input help section */
.file-input-help {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.file-input-help p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

.file-input-help p:first-child {
    margin-top: 0;
}

.file-input-help p:last-child {
    margin-bottom: 0;
}

.file-input-help strong {
    color: #333;
}

/* File input styling */
input[type="file"] {
    padding: 0.75rem;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="file"]:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

input[type="file"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* File info display */
.file-info {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #e8f5e8;
    border-radius: 6px;
    border-left: 3px solid #28a745;
    transition: all 0.3s ease;
}

.file-info p {
    margin: 0.25rem 0;
    font-size: 0.85rem;
    color: #155724;
    line-height: 1.3;
}

.file-info p:first-child {
    margin-top: 0;
}

.file-info p:last-child {
    margin-bottom: 0;
}

.file-info strong {
    color: #0f5132;
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
    input[type="file"] {
        min-height: 60px;
        font-size: 16px;
    }
    
    .file-input-help {
        font-size: 0.85rem;
    }
    
    .file-info {
        font-size: 0.8rem;
    }
}
