:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #8b5cf6;
    --bg-dark: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Animated Background Shapes */
.bg-shape {
    position: absolute;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.6;
    border-radius: 50%;
    animation: float 20s infinite alternate;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background-color: var(--primary-color);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 600px;
    height: 600px;
    background-color: var(--secondary-color);
    bottom: -200px;
    right: -100px;
    animation-delay: -5s;
}

.shape-3 {
    width: 400px;
    height: 400px;
    background-color: #ec4899;
    top: 40%;
    left: 30%;
    animation-delay: -10s;
    opacity: 0.3;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(100px, 50px) scale(1.1); }
    100% { transform: translate(-50px, 100px) scale(0.9); }
}

/* Layout */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.header {
    text-align: center;
    margin-bottom: 1rem;
    animation: fadeInDown 0.8s ease-out forwards;
}

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

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: white;
}

.logo i {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo span {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Glass Panel Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.main-content {
    padding: 2.5rem;
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

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

.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.form-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-secondary);
}

.form-section {
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--primary-color);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Form Elements */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.full-width {
    grid-column: 1 / -1;
    margin-bottom: 1.5rem;
}

label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

input[type="text"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

input[type="text"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
    background: rgba(15, 23, 42, 0.8);
}

input::placeholder,
textarea::placeholder {
    color: #475569;
}

/* Custom Select */
.select-wrapper {
    position: relative;
    width: 100%;
}

select {
    appearance: none;
    cursor: pointer;
}

.select-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

/* File Drop Area */
.file-drop-area {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.4);
    transition: var(--transition);
    position: relative;
}

.file-drop-area:hover,
.file-drop-area.dragover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.file-drop-area i {
    font-size: 2.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: block;
}

.file-drop-area:hover i {
    color: var(--primary-color);
}

.file-msg {
    color: var(--text-secondary);
}

.file-drop-area input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-list {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 0.9rem;
}

.file-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-remove {
    color: var(--danger);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.25rem;
    transition: var(--transition);
}

.file-remove:hover {
    color: #f87171;
    transform: scale(1.1);
}

/* Media Checkboxes */
.media-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.media-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.media-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.media-count strong {
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
}

.btn-outline.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--primary-color);
    color: #60a5fa;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.media-card {
    position: relative;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.media-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.media-card.selected {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.15);
}

.media-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.media-card.selected .media-checkbox,
.media-checkbox:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.media-checkbox:checked::after,
.media-card.selected .media-checkbox::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.media-name {
    font-size: 0.95rem;
    font-weight: 500;
    word-break: break-all;
}

/* Actions */
.form-actions {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1.25rem 3rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 10px 20px -10px rgba(59, 130, 246, 0.7);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: inherit;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px -10px rgba(59, 130, 246, 0.8);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

.form-note {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Footer */
.footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    max-width: 450px;
    width: 90%;
    padding: 3rem 2rem;
    text-align: center;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.show .modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-icon {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 1.5rem;
}

.modal h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.modal p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .media-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .main-content {
        padding: 1.5rem;
    }
}
