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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.logo i {
    font-size: 1.8rem;
    color: #ffd700;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #ffd700;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffd700;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Main Content */
.main {
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

/* Shortener Form */
.shortener-form {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Mode Toggle */
.mode-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.25rem;
}

.mode-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    background: #223a5e;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.mode-btn.active {
    background: #ffd700;
    color: #223a5e;
}

.mode-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
}

/* URL Modes */
.url-mode {
    display: none;
}

.url-mode.active {
    display: block;
}

/* Batch Mode Styles */
.batch-input-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.batch-inputs-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.url-input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.url-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.dynamic-url-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    transition: all 0.3s ease;
}

.dynamic-url-input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
}

.remove-url-btn {
    padding: 0.75rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.remove-url-btn:hover {
    background: #c82333;
    transform: scale(1.05);
}

.add-url-btn {
    padding: 1rem 2rem;
    background: #28a745;
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-url-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.batch-controls {
    display: flex;
    gap: 1rem;
}

.clear-btn {
    padding: 1rem 2rem;
    background: #6c757d;
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clear-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Batch Results */
.batch-result-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
    color: #333;
    animation: slideDown 0.5s ease;
}

.batch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.batch-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.3rem;
}

.copy-all-btn {
    padding: 0.3rem 0.7rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.copy-all-btn:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.download-all-btn {
    padding: 0.5rem 1rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.download-all-btn:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.batch-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.batch-result-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 0;
    margin-bottom: 0.2rem;
}

.batch-result-item.error {
    background: #f8d7da;
}

.batch-result-item .original-url {
    font-weight: 600;
    color: #666;
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.batch-result-item .shortened-url {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.batch-result-item .shortened-url input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    background: white;
}

.batch-result-item .copy-single-btn {
    padding: 0.25rem 0.5rem;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.batch-result-item .copy-single-btn:hover {
    background: #218838;
    transform: scale(1.05);
}

.batch-result-item .error-message {
    color: #dc3545;
    font-size: 0.9rem;
    font-style: italic;
}

.batch-progress {
    text-align: center;
    padding: 1rem;
    color: #666;
}

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

.batch-progress .progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    width: 0%;
    transition: width 0.3s ease;
}

.batch-summary {
    background: #e8f5e8;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #28a745;
}

.batch-summary p {
    margin: 0.25rem 0;
    color: #333;
}

/* Responsive adjustments for batch mode */
@media (max-width: 768px) {
    .batch-controls {
        flex-direction: column;
    }
    
    .batch-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .copy-all-btn,
    .download-all-btn {
        width: 100%;
        justify-content: center;
    }
    
    .mode-toggle {
        flex-direction: column;
    }
    
    .mode-btn {
        width: 100%;
    }
    
    .url-input-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .remove-url-btn {
        align-self: flex-end;
        width: 40px;
    }
    
    .batch-inputs-container {
        max-height: 300px;
    }
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.url-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    transition: all 0.3s ease;
}

.url-input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
}

.shorten-btn {
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    border: none;
    border-radius: 10px;
    color: #333;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.shorten-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.3);
}

.shorten-btn:active {
    transform: translateY(0);
}

/* Result Container */
.result-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
    color: #333;
    animation: slideDown 0.5s ease;
}

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

.result-item {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.original-url,
.shortened-url {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.original-url {
    font-size: 0.92rem;
    color: #666;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    font-family: 'Inter', 'Arial', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.shortened-url {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}
.short-url-row, .short-url-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
    width: 100%;
}
.short-url-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}
.short-url-actions { display: none; }

.short-url-input {
    flex: 1;
    padding: 0.1rem 0.3rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.88rem;
    background: #f8f9fa;
    color: #333;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    resize: none;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    text-overflow: unset;
    box-sizing: border-box;
    line-height: 1.5;
    min-height: 1.3em;
    font-weight: bold;
}

.copy-btn {
    padding: 0.75rem 1rem;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #218838;
    transform: scale(1.05);
}

.qr-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.qr-code {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.download-qr-btn {
    padding: 0.75rem 1.5rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.download-qr-btn:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.toggle-qr-btn {
    padding: 0.5rem 1.2rem;
    background: #ffd700;
    color: #333;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
}
.toggle-qr-btn:hover {
    background: #ffed4e;
}

.qr-collapse {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(.4,0,.2,1), opacity 0.3s;
}
.qr-collapse.active {
    max-height: 300px;
    opacity: 1;
    margin-top: 0.5rem;
}

/* Loading State */
.loading-container {
    text-align: center;
    padding: 2rem;
    color: white;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ffd700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error State */
.error-container {
    text-align: center;
    padding: 2rem;
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 10px;
    margin-top: 1rem;
}

.error-container i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Features Section */
.features {
    padding: 4rem 0;
    background: rgba(255, 255, 255, 0.1);
    margin: 4rem 0;
    border-radius: 20px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.feature-icon i {
    font-size: 1.5rem;
    color: #333;
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* About Section */
.about {
    padding: 4rem 0;
    color: white;
}

.about-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-content p {
    font-size: 1.1rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.8;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.2);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    border-radius: 20px 20px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: #ffd700;
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #ffd700;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #ffd700;
    color: #333;
    transform: scale(1.1);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .shortener-form {
        padding: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .shortener-form {
        padding: 1rem;
    }
} 

.toggle-long-url-btn {
    padding: 0.4rem 1.1rem;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-right: 0.7rem;
    transition: background 0.2s;
}
.toggle-long-url-btn:hover {
    background: #0056b3;
}

.toggle-long-url-btn.compact {
    padding: 0.12rem 0.2rem;
    background: #ffd700;
    color: #333;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    margin-right: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
    height: 40px;
    min-width: 44px;
    line-height: 1.1;
}
.toggle-long-url-btn.compact:hover {
    background: #ffed4e;
}

.long-url-content {
    display: inline-block;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    vertical-align: middle;
    transition: max-width 0.4s cubic-bezier(.4,0,.2,1), opacity 0.3s;
    white-space: nowrap;
    color: #007bff;
    font-family: 'Courier New', monospace;
    font-size: 0.92rem;
}
.long-url-content.active {
    max-width: 800px;
    opacity: 1;
    margin-left: 0.5rem;
} 

.short-url-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.1rem;
}
.batch-index {
    font-size: 1rem;
    color: #888;
    min-width: 1.5em;
    text-align: right;
    font-weight: 600;
    flex-shrink: 0;
} 