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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    padding: 15px;
    margin: 0;
    position: relative;
    overflow-x: hidden;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    padding: 25px 30px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

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

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
    border-radius: 15px;
    z-index: -1;
}

.logo {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #667eea;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

h1 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.subtitle {
    color: #666;
    font-size: 1rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.features {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Upload Section Styles */
.upload-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    padding: 25px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.8s ease-out 0.2s both;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.upload-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

/* Upload Method Cards */
.upload-method {
    background: rgba(102, 126, 234, 0.03);
    border: 2px dashed rgba(102, 126, 234, 0.2);
    border-radius: 15px;
    padding: 20px 15px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-method:hover {
    border-color: rgba(102, 126, 234, 0.4);
    background: rgba(102, 126, 234, 0.06);
    transform: translateY(-2px);
}

.upload-method::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}

.upload-method:hover::before {
    left: 100%;
}

.upload-method i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 12px;
    display: block;
}

.upload-method h3 {
    color: #333;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.upload-method p {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
}

.file-input {
    display: none;
}

/* Text Area Styles */
.text-area-container {
    grid-column: 1 / -1;
    background: rgba(102, 126, 234, 0.03);
    border: 2px dashed rgba(102, 126, 234, 0.2);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
}

.text-area-container:focus-within {
    border-color: rgba(102, 126, 234, 0.4);
    background: rgba(102, 126, 234, 0.06);
}

.script-textarea {
    width: 100%;
    min-height: 120px;
    max-height: 250px;
    border: none;
    background: transparent;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #333;
    resize: vertical;
    outline: none;
    line-height: 1.5;
}

.script-textarea::placeholder {
    color: #999;
}

/* Button Styles */
.analyze-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.analyze-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.analyze-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

.analyze-btn:hover:not(:disabled)::before {
    left: 100%;
}

.analyze-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.analyze-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

/* Progress Section */
.progress-section {
    text-align: center;
    padding: 30px 25px;
    background: rgba(102, 126, 234, 0.03);
    border-radius: 15px;
    margin-top: 20px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.progress-header h3 {
    color: #333;
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.progress-header p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.progress-container {
    margin: 25px 0;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 8px;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.progress-text {
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.progress-subtext {
    color: #666;
    font-size: 0.85rem;
}

/* Success Section */
.success-section {
    text-align: center;
    padding: 30px 25px;
    background: rgba(40, 167, 69, 0.03);
    border-radius: 15px;
    margin-top: 20px;
    border: 1px solid rgba(40, 167, 69, 0.1);
}

.success-icon {
    font-size: 2.5rem;
    color: #28a745;
    margin-bottom: 20px;
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.success-section h3 {
    color: #333;
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.success-section p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

/* Quick Results */
.quick-scores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.quick-score-item {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 15px;
    border-left: 3px solid;
    transition: transform 0.3s ease;
}

.quick-score-item:hover {
    transform: translateY(-2px);
}

.quick-score-item.excellent {
    border-left-color: #28a745;
}

.quick-score-item.good {
    border-left-color: #17a2b8;
}

.quick-score-item.average {
    border-left-color: #ffc107;
}

.quick-score-item.poor {
    border-left-color: #dc3545;
}

.score-value {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 4px;
}

.score-label {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

.quick-summary {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
}

.quick-summary p {
    color: #333;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* Error Section */
.error-section {
    text-align: center;
    padding: 30px 25px;
    background: rgba(220, 53, 69, 0.03);
    border-radius: 15px;
    margin-top: 20px;
    border: 1px solid rgba(220, 53, 69, 0.1);
}

.error-icon {
    font-size: 2.5rem;
    color: #dc3545;
    margin-bottom: 20px;
    animation: shake 0.6s ease-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    75% {
        transform: translateX(8px);
    }
}

.error-section h3 {
    color: #333;
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.error-section p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

/* Additional Button Styles */
.view-results-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 18px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.view-results-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
}

.analyze-another-btn {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 18px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.analyze-another-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108, 117, 125, 0.3);
}

.retry-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 18px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* Responsive Design */
@media (max-width: 1366px) {
    .container {
        max-width: 90%;
    }

    .header {
        padding: 20px 25px;
    }

    .upload-section {
        padding: 20px 25px;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 95%;
        padding: 12px;
    }

    .header {
        padding: 20px 25px;
    }

    .upload-section {
        padding: 20px 25px;
    }

    .quick-scores {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header {
        padding: 20px 20px;
        margin-bottom: 15px;
    }

    .logo {
        font-size: 2rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .upload-methods {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .upload-section {
        padding: 20px 20px;
    }

    .features {
        flex-direction: column;
        gap: 15px;
    }

    .quick-scores {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .progress-section,
    .success-section,
    .error-section {
        padding: 25px 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 12px;
    }

    .header {
        padding: 18px 15px;
        border-radius: 12px;
    }

    .logo {
        font-size: 1.8rem;
    }

    h1 {
        font-size: 1.4rem;
    }

    .upload-section {
        padding: 18px 15px;
        border-radius: 12px;
    }

    .analyze-btn {
        padding: 14px 25px;
        font-size: 0.95rem;
        max-width: 220px;
    }

    .view-results-btn,
    .analyze-another-btn,
    .retry-btn {
        padding: 10px 18px;
        font-size: 0.9rem;
        margin: 6px;
    }

    .progress-section,
    .success-section,
    .error-section {
        padding: 20px 15px;
        border-radius: 12px;
    }
}