/* URL Shortener Specific Styles */

/* Mode Selection */
.mode-selection {
    padding: 2rem 3rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.mode-tabs {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.mode-tab {
    padding: 0.75rem 2rem;
    border: 2px solid #e2e8f0;
    background: white;
    color: #64748b;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 1rem;
}

.mode-tab.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.mode-tab:hover:not(.active) {
    border-color: #667eea;
    color: #667eea;
}

/* Single URL Section */
.single-url-section {
    padding: 3rem;
}

.url-input-container {
    margin-bottom: 2rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

.input-with-button {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

#urlInput {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

#urlInput:focus {
    outline: none;
    border-color: #667eea;
}

#urlInput:invalid {
    border-color: #ef4444;
}

/* Result Section */
.result-section {
    margin-top: 2rem;
}

.result-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
}

.result-card h3 {
    text-align: center;
    color: #1e293b;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
}

.url-result {
    margin-bottom: 2rem;
}

.original-url,
.short-url {
    margin-bottom: 1rem;
}

.original-url label,
.short-url label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
    font-size: 0.875rem;
}

.original-url p {
    background: white;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    word-break: break-all;
    color: #64748b;
    margin: 0;
}

.short-url-container {
    display: flex;
    gap: 0.5rem;
}

#shortUrlDisplay {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #10b981;
    border-radius: 6px;
    background: white;
    color: #1e293b;
    font-weight: 600;
    font-size: 1rem;
}

.result-actions {
    text-align: center;
}

/* Batch CSV Section */
.batch-csv-section {
    padding: 3rem;
}

.csv-upload-container {
    margin-bottom: 2rem;
}

.upload-info {
    margin-bottom: 2rem;
    text-align: center;
}

.upload-info h3 {
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.upload-info p {
    color: #64748b;
    margin-bottom: 1rem;
}

.csv-example {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem auto;
    max-width: 400px;
    text-align: left;
}

.csv-example strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #374151;
}

.csv-example code {
    display: block;
    background: white;
    padding: 0.75rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.875rem;
    color: #059669;
    border: 1px solid #d1fae5;
    line-height: 1.4;
}

.csv-upload-area {
    border: 3px dashed #e2e8f0;
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    background: #f8fafc;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 1rem;
}

.csv-upload-area:hover,
.csv-upload-area.dragover {
    border-color: #667eea;
    background: #f1f5f9;
}

.csv-upload-area .upload-content svg {
    color: #94a3b8;
    margin-bottom: 1rem;
}

.csv-upload-area h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.csv-upload-area p {
    color: #64748b;
    margin: 0;
}

.csv-actions {
    text-align: center;
}

/* Batch Results */
.batch-results-section {
    margin-top: 2rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.results-header h3 {
    color: #1e293b;
    margin: 0;
}

.results-table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th {
    background: #667eea;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.results-table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.results-table tr:last-child td {
    border-bottom: none;
}

.results-table tr:nth-child(even) {
    background: #f8fafc;
}

.url-cell {
    max-width: 300px;
    word-break: break-all;
    color: #64748b;
}

.short-url-cell {
    color: #059669;
    font-weight: 600;
}

.copy-cell {
    text-align: center;
    width: 100px;
}

.copy-btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border: none;
    border-radius: 4px;
    background: #667eea;
    color: white;
    cursor: pointer;
    transition: background 0.2s ease;
}

.copy-btn-small:hover {
    background: #5a67d8;
}

.batch-actions {
    text-align: center;
}

/* Progress Section */
.progress-section {
    padding: 2rem 3rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.progress-container {
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
    width: 0%;
}

#progressText {
    color: #64748b;
    font-weight: 500;
}

/* Copy Success Animation */
.copy-success {
    background: #10b981 !important;
    color: white !important;
}

.copy-success::after {
    content: ' ✓';
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mode-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .mode-tab {
        width: 200px;
        text-align: center;
    }
    
    .input-with-button {
        flex-direction: column;
        gap: 1rem;
    }
    
    .short-url-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .results-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .results-table-container {
        overflow-x: auto;
    }
    
    .results-table {
        min-width: 600px;
    }
    
    .single-url-section,
    .batch-csv-section {
        padding: 2rem 1.5rem;
    }
    
    .mode-selection {
        padding: 2rem 1.5rem 1rem;
    }
}