/* CSS Custom Properties for consistent theming */
:root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;
    --primary: 222.2 47.4% 11.2%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;
    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 47.4% 11.2%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 222.2 84% 4.9%;
    --radius: 0.5rem;
    
    /* Custom brand colors */
    --brand-primary: #50E5B4;
    --brand-primary-hover: #3bc598;
    --brand-dark: #052b2f;
    --brand-darker: #063b40;
}

/* Reset and base styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: hsl(var(--border));
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -moz-tab-size: 4;
    -o-tab-size: 4;
    tab-size: 4;
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", Segoe UI Symbol, "Noto Color Emoji";
    font-feature-settings: normal;
    font-variation-settings: normal;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    line-height: inherit;
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    min-height: 100vh;
    background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-darker) 100%);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin-right: auto;
    margin-left: auto;
    padding-right: 2rem;
    padding-left: 2rem;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2.5rem;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--brand-primary);
}

.header p {
    font-size: 1.125rem;
    line-height: 1.75rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Main content */
.main-content {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
}

/* Upload section */
.upload-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    backdrop-filter: blur(10px);
}

.upload-area {
    border: 2px dashed hsl(var(--border));
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 1.5rem;
    cursor: pointer;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--brand-primary);
    background-color: hsl(var(--accent));
    transform: translateY(-2px);
}

.upload-icon {
    font-size: 2rem;
    color: var(--brand-primary);
    margin-bottom: 0.75rem;
}

.upload-area h3 {
    font-size: 1.25rem;
    line-height: 1.75rem;
    margin-bottom: 0.5rem;
    color: hsl(var(--foreground));
    font-weight: 600;
}

.upload-area p {
    color: hsl(var(--muted-foreground));
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.upload-btn {
    background: var(--brand-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.upload-btn:hover {
    background: var(--brand-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(80 229 180 / 0.3);
}

/* Form section */
.form-section {
    margin-top: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid hsl(var(--input));
    border-radius: calc(var(--radius) - 2px);
    font-size: 1rem;
    line-height: 1.5rem;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
}

.form-group input:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px rgb(80 229 180 / 0.2);
}

.form-group input::placeholder {
    color: hsl(var(--muted-foreground));
}

/* Input container for validation icons */
.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-container input {
    padding-right: 2.5rem; /* Make room for the validation icon */
}

/* Validation icon styles */
.validation-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    transition: all 0.2s ease-in-out;
    pointer-events: none;
    z-index: 10;
}

.validation-icon.valid {
    color: #10b981; /* Green color for valid state */
    opacity: 1;
}

.validation-icon.invalid {
    color: #ef4444; /* Red color for invalid state */
    opacity: 1;
}

/* Animation for validation icons */
@keyframes checkmarkAppear {
    0% {
        opacity: 0;
        transform: translateY(-50%) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

.validation-icon.valid {
    animation: checkmarkAppear 0.3s ease-out;
}

/* File info */
.file-info {
    background: hsl(var(--accent));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    font-size: 0.875rem;
}

.file-details i {
    color: var(--brand-primary);
    font-size: 1.25rem;
}

.file-details span {
    color: hsl(var(--foreground));
    font-weight: 500;
}

.remove-btn {
    background: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: calc(var(--radius) - 4px);
    cursor: pointer;
    transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    line-height: 1.25rem;
    flex-shrink: 0;
}

.remove-btn:hover {
    background: hsl(var(--destructive) / 0.9);
}

/* Submit button */
.submit-btn {
    width: 100%;
    background: var(--brand-primary);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-btn:hover:not(:disabled) {
    background: var(--brand-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(80 229 180 / 0.3);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    pointer-events: none;
}

/* Notification */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    color: white;
    font-weight: 600;
    transform: translateX(400px);
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
    max-width: 300px;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: var(--brand-primary);
}

.notification.error {
    background: #dc2626;
    color: white;
    border: 2px solid #b91c1c;
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.3), 0 2px 4px -1px rgba(220, 38, 38, 0.2);
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.notification.info {
    background: #3b82f6;
}

/* Progress bar */
.progress-container {
    margin: 1rem 0;
    padding: 1rem;
    background: hsl(var(--muted));
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: hsl(var(--secondary));
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--brand-primary);
    border-radius: 9999px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 2rem;
        line-height: 2.5rem;
    }
    
    .upload-card {
        padding: 1rem;
    }
    
    .upload-area {
        padding: 1rem;
        min-height: 100px;
    }
    
    .upload-icon {
        font-size: 1.5rem;
    }
    
    .upload-area h3 {
        font-size: 1.125rem;
    }
    
    .file-info {
        max-width: 100%;
        padding: 0.5rem;
    }
    
    .file-details {
        font-size: 0.75rem;
    }
    
    .notification {
        right: 1rem;
        left: 1rem;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
    
    .validation-icon {
        font-size: 0.875rem;
        right: 0.5rem;
    }
    
    .input-container input {
        padding-right: 2rem;
    }
}

/* Loading animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading::before {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid hsl(var(--border));
    border-top: 2px solid var(--brand-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

/* Error states */
.error {
    color: hsl(var(--destructive));
    text-align: center;
    padding: 1rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

/* Additional utility classes */
.text-center {
    text-align: center;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.text-5xl {
    font-size: 3rem;
    line-height: 1;
}

/* Responsive text sizes */
@media (min-width: 640px) {
    .sm\:text-2xl {
        font-size: 1.5rem;
        line-height: 2rem;
    }
    
    .sm\:text-4xl {
        font-size: 2.25rem;
        line-height: 2.5rem;
    }
    
    .sm\:text-base {
        font-size: 1rem;
        line-height: 1.5rem;
    }
    
    .sm\:text-lg {
        font-size: 1.125rem;
        line-height: 1.75rem;
    }
    
    .sm\:text-xl {
        font-size: 1.25rem;
        line-height: 1.75rem;
    }
}

@media (min-width: 1024px) {
    .lg\:text-5xl {
        font-size: 3rem;
        line-height: 1;
    }
}

/* Error message styles */
.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
    min-height: 1.2em;
    transition: opacity 0.2s;
}

.input-container input.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1);
}

/* Success page styles */
.success-card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.success-icon {
    font-size: 4rem;
    color: var(--brand-primary);
    margin-bottom: 1.5rem;
    animation: successPulse 2s ease-in-out;
}

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

.success-card h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin-bottom: 1rem;
}

.success-card p {
    font-size: 1.125rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 2rem;
    line-height: 1.75rem;
}

.submission-details {
    background: hsl(var(--accent));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.submission-details h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 1rem;
    text-align: center;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid hsl(var(--border));
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item .label {
    font-weight: 600;
    color: hsl(var(--foreground));
    font-size: 0.875rem;
}

.detail-item .value {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    text-align: right;
    word-break: break-word;
    max-width: 60%;
}

.next-steps {
    background: hsl(var(--accent));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.next-steps h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 1rem;
    text-align: center;
}

.next-steps ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.next-steps li {
    padding: 0.5rem 0;
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    position: relative;
    padding-left: 1.5rem;
}

.next-steps li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--brand-primary);
    font-weight: bold;
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--brand-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--brand-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(80 229 180 / 0.3);
}

.btn-secondary {
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
    border: 1px solid hsl(var(--border));
}

.btn-secondary:hover {
    background: hsl(var(--secondary) / 0.8);
    transform: translateY(-2px);
}

/* Mobile responsiveness for success page */
@media (max-width: 768px) {
    .success-card {
        padding: 1.5rem;
        margin: 0 1rem;
    }
    
    .success-icon {
        font-size: 3rem;
    }
    
    .success-card h2 {
        font-size: 1.5rem;
    }
    
    .success-card p {
        font-size: 1rem;
    }
    
    .submission-details, .next-steps {
        padding: 1rem;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .detail-item .value {
        max-width: 100%;
        text-align: left;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
} 