:root {
    --primary-color: #4338ca;
    --primary-hover: #3730a3;
    --bg-gradient-start: #f8fafc;
    --bg-gradient-end: #e2e8f0;
    --card-bg: rgba(255, 255, 255, 0.75);
    --card-border: rgba(255, 255, 255, 0.4);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

/* Background Shapes for Glassmorphism effect */
.background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite ease-in-out alternate;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: #a5b4fc;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: #c4b5fd;
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: #93c5fd;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

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

/* Main Container */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 600px;
    padding: 40px;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    box-shadow: 0 20px 40px var(--shadow-color);
    text-align: center;
    transform: translateY(20px);
    opacity: 0;
    animation: fade-in-up 0.8s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fade-in-up {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header .office-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0;
    line-height: 1.2;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.header h1 span {
    color: var(--primary-color);
    display: block;
    font-size: 32px;
}

.header p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 32px;
}

/* Upload Section */
.upload-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.drop-zone {
    border: 2px dashed rgba(67, 56, 202, 0.3);
    border-radius: 16px;
    padding: 48px 24px;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.drop-zone.drag-active {
    border-color: var(--primary-color);
    background: rgba(67, 56, 202, 0.05);
    transform: scale(1.02);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: opacity 0.3s ease;
}

.upload-icon {
    color: var(--primary-color);
    margin-bottom: 8px;
    transition: transform 0.3s ease;
}

.drop-zone:hover .upload-icon {
    transform: translateY(-5px);
}

.drop-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

.or-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.file-btn {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(67, 56, 202, 0.1);
    color: var(--primary-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.file-btn:hover {
    background: rgba(67, 56, 202, 0.2);
}

input[type="file"] {
    display: none;
}

/* Selected File State */
.selected-file {
    padding: 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.selected-file:not(.hidden) {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

.hidden {
    display: none !important;
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.file-info .file-icon {
    color: var(--primary-color);
}

.file-name {
    flex: 1;
    margin: 0 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.remove-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s;
}

.remove-btn:hover {
    color: var(--error-color);
    background: rgba(239, 68, 68, 0.1);
}

/* Generate Button */
.generate-btn {
    position: relative;
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.generate-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(67, 56, 202, 0.2);
}

.generate-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loader Animation */
.loader {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
}

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

.loading .btn-text {
    opacity: 0;
}

.loading .loader {
    display: block;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 50;
}

.toast {
    padding: 16px 24px;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.error {
    background: var(--error-color);
}

.toast.success {
    background: var(--success-color);
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 24px;
        margin: 20px;
        width: auto;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .header h1 span {
        font-size: 26px;
    }

    .header .office-name {
        font-size: 24px;
    }
}
