* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    padding: 40px;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

h1 {
    color: #667eea;
    text-align: center;
    margin-bottom: 10px;
    font-size: 2em;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 0.9em;
}

.mode-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}
.mode-tab {
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 40px;
    transition: 0.2s;
}
.mode-tab.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}
.mode-content {
    display: none;
}
.mode-content.active {
    display: block;
}

.input-group {
    margin-bottom: 20px;
}
label {
    display: block;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
}
textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.3s;
}
textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* File upload */
.file-upload-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}
.file-upload-wrapper input[type="file"] {
    position: absolute;
    left: -9999px;
    opacity: 0;
}
.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px dashed #667eea;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}
.file-upload-label i {
    font-size: 1.2rem;
    transition: transform 0.2s;
}
.file-upload-label:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    border-color: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}
.file-upload-label:hover i {
    transform: scale(1.1);
}
.file-name {
    margin-top: 8px;
    font-size: 0.8rem;
    color: #666;
    text-align: center;
}

button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102,126,234,0.4);
}
.loading {
    text-align: center;
    margin-top: 20px;
}
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.result { margin-top: 30px; padding: 25px; border-radius: 10px; animation: fadeIn 0.5s; }
.result.positive { background: #d4edda; border: 2px solid #28a745; }
.result.negative { background: #f8d7da; border: 2px solid #dc3545; }
.result.neutral { background: #fff3cd; border: 2px solid #ffc107; }
.sentiment-label { font-size: 1.5em; font-weight: bold; margin-bottom: 10px; }
.confidence { font-size: 1.1em; margin-bottom: 15px; }
.confidence-bar { width: 100%; height: 10px; background: rgba(0,0,0,0.1); border-radius: 5px; overflow: hidden; }
.confidence-fill { height: 100%; border-radius: 5px; transition: width 0.5s; }

.examples { margin-top: 20px; padding: 15px; background: #f8f9fa; border-radius: 10px; }
.examples h3 { color: #667eea; margin-bottom: 10px; }
.example-item { padding: 8px; margin: 5px 0; background: white; border-radius: 5px; cursor: pointer; transition: 0.2s; }
.example-item:hover { background: #e9ecef; }

.summary-cards { display: flex; gap: 15px; margin: 20px 0; flex-wrap: wrap; }
.summary-card { flex: 1; background: #f8f9fa; padding: 15px; border-radius: 12px; text-align: center; }
.summary-card .summary-label { display: block; font-size: 0.85rem; color: #555; }
.summary-card .summary-value { display: block; font-size: 1.8rem; font-weight: 700; }
.positive-bg { background: #d4edda; }
.negative-bg { background: #f8d7da; }
.neutral-bg { background: #fff3cd; }

.sentence-table { margin: 20px 0; overflow-x: auto; }
.result-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.result-table th, .result-table td { border: 1px solid #ddd; padding: 10px; text-align: left; }
.result-table th { background: #667eea; color: white; }
.sentiment-positive { background-color: #d4edda; }
.sentiment-negative { background-color: #f8d7da; }
.sentiment-neutral { background-color: #fff3cd; }

.download-btn { background: #28a745; width: auto; padding: 10px 20px; margin-top: 20px; }
.download-btn:hover { background: #218838; }

footer { margin-top: 30px; text-align: center; padding-top: 20px; border-top: 1px solid #eee; }
footer p { color: #667eea; font-weight: 500; margin-bottom: 8px; }
.social-links a { color: #667eea; font-size: 1.5rem; margin: 0 10px; display: inline-block; transition: 0.2s; }
.social-links a:hover { transform: scale(1.15); color: #764ba2; }

.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }