/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

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

/* Main content */
main {
    flex: 1;
    display: grid;
    gap: 30px;
    grid-template-columns: 1fr;
}

/* Upload section */
.upload-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.drop-zone {
    border: 3px dashed #666;
    border-radius: 15px;
    padding: 60px 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fcfcfc;
}

.drop-zone:hover {
    border-color: #333;
    background: #f8f8f8;
    transform: translateY(-2px);
}

.drop-zone.dragover {
    border-color: #000;
    background: #f0f0f0;
    transform: scale(1.02);
}

.drop-zone-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
}

.drop-zone h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.drop-zone p {
    color: #666;
    margin-bottom: 20px;
}

.browse-btn {
    background: #333;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
}

.browse-btn:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Progress section */
.progress-section {
    margin-top: 30px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: #333;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 5px;
}

#progressText {
    color: #666;
    font-weight: 500;
}

/* Result section */
.result-section {
    margin-top: 30px;
}

.result-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.result-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.result-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    gap: 15px;
}

.login-section {
    max-width: 400px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.login-form h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
}

.login-form .browse-btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

.error-message {
    color: #d9534f;
    background-color: #f2dede;
    border: 1px solid #ebccd1;
    padding: 10px;
    border-radius: 4px;
    margin-top: 15px;
    text-align: center;
}

.stat-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

/* Info section */
.info-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.info-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.info-section ul {
    list-style: none;
    padding: 0;
}

.info-section li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 1rem;
}

.info-section li:last-child {
    border-bottom: none;
}

/* API section */
.api-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.api-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.endpoint-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.endpoint-card {
    background: #f8f9ff;
    border: 1px solid #e0e7ff;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.endpoint-card code {
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.endpoint-card p {
    color: #666;
    font-size: 0.9rem;
}

.docs-link {
    display: inline-block;
    background: #333;
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.docs-link:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    color: #333;
    opacity: 0.8;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 1rem;
    }

    .upload-section {
        padding: 25px;
    }

    .drop-zone {
        padding: 40px 15px;
    }

    .upload-icon {
        font-size: 3rem;
    }

    .drop-zone h3 {
        font-size: 1.2rem;
    }

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

    .result-stats {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) {
    main {
        grid-template-columns: 2fr 1fr;
        grid-template-rows: auto auto;
    }

    .upload-section {
        grid-column: 1 / -1;
    }
}

/* Animation for success/error messages */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-success,
.result-error {
    animation: slideIn 0.3s ease;
}

/* Loading animation */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s infinite;
}