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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Auth Styles */
#auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.auth-header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.auth-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Clerk component styling */
.cl-root {
    width: 100%;
    max-width: 400px;
}

/* Dashboard Styles */
.dashboard-header {
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Clerk component styling */
.clerk-components {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* Ensure Clerk components are visible */
#sign-in, #sign-up {
    min-height: 400px;
}

.dashboard-main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.card h2 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.3rem;
}

/* Button Styles */
.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #5a6fd8;
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Actions Grid */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.action-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s;
    font-size: 14px;
}

.action-btn:hover {
    border-color: #667eea;
    background: white;
    transform: translateY(-2px);
}

/* Upload Area */
.upload-area {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.file-input {
    flex: 1;
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 6px;
    background: #f8f9fa;
}

/* Result Containers */
.result-container {
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    display: none;
}

.result-container.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.result-container.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.result-container.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    display: block;
}

/* Loading States */
.loading {
    color: #6c757d;
    font-style: italic;
}

.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;
    color: white;
    z-index: 1000;
}

.spinner {
    border: 4px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top: 4px solid white;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

/* User Info Display */
.user-detail {
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.user-detail strong {
    color: #495057;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .dashboard-main {
        padding: 1rem;
    }

    .actions-grid {
        grid-template-columns: 1fr;
    }

    .upload-area {
        flex-direction: column;
    }

    .file-input {
        width: 100%;
    }
}
