* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif; /* Stylish Modern Font */
}

body {
    background-color: #f4f7f6;
    color: #333;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

.logo span {
    color: #007bff;
}

nav a {
    margin-left: 20px;
    text-decoration: none;
    color: #666;
    font-weight: 600;
}

nav a.active {
    color: #007bff;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
}

.container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    text-align: center;
}

h1 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #1a252f;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
}

.upload-box {
    border: 2px dashed #007bff;
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 25px;
    transition: 0.3s;
}

.upload-box:hover {
    background-color: #eef6ff;
}

.upload-btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: #007bff;
    color: white;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 10px;
}

.controls-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.preset-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 15px 0;
}

.preset-btn {
    padding: 8px 16px;
    border: 1px solid #007bff;
    background: white;
    color: #007bff;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
}

.preset-btn.selected {
    background: #007bff;
    color: white;
}

.custom-input-group {
    margin: 15px 0;
}

.custom-input-group input {
    padding: 8px;
    width: 100px;
    border: 1px solid #ccc;
    border-radius: 6px;
    text-align: center;
    font-size: 16px;
}

.action-btn {
    padding: 12px 30px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

.action-btn:hover {
    background-color: #218838;
}

.results-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.download-link {
    background: #007bff;
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 14px;
}
/* Selected File Info Styling */
.file-info {
    margin-top: 10px;
    font-weight: bold;
    color: #28a745;
    background: #e8f5e9;
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-block;
}
/* --- Loading Spinner & Animation --- */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
    gap: 15px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3; /* Halka grey background */
    border-top: 5px solid #007bff; /* Blue rang jo ghumega */
    border-radius: 50%;
    animation: spin 1s linear infinite; /* 1 second me ek chakkar */
}

#loadingText {
    font-weight: bold;
    color: #555;
    font-size: 16px;
}

/* Spinner ghumne ki animation logic */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Mobile Responsive Header Fix */
@media (max-width: 600px) {
    header {
        flex-direction: column;
        gap: 12px;
        padding: 15px 20px;
    }

    nav {
        display: flex;
        gap: 15px;
    }

    nav a {
        margin-left: 0;
        font-size: 14px;
    }
}
