/* URL Shortener - Complete Professional Styles */

.urlshortener-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.urlshortener-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.urlshortener-title {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

.urlshortener-heart {
    font-size: 2.8rem;
    display: inline-block;
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    75% { transform: scale(0.95); }
}

.urlshortener-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    font-family: 'Poppins', sans-serif;
}

/* Stats Banner */
.urlshortener-stats-banner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    color: white;
    text-align: center;
}

.stat-item {
    flex: 1;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Cards */
.urlshortener-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.urlshortener-card:hover {
    box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.15);
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

.section-subtitle {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1.2rem;
}

/* Input Groups */
.urlshortener-input-group {
    margin-bottom: 1.2rem;
}

.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.input-label {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
}

.required {
    color: #ef4444;
}

.optional {
    color: var(--text-light);
    font-weight: normal;
}

.input-actions {
    display: flex;
    gap: 0.5rem;
}

.preset-small {
    background: transparent;
    border: 1px solid var(--border);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s;
}

.preset-small:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.urlshortener-input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
}

.urlshortener-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.urlshortener-select {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
}

textarea.urlshortener-input {
    resize: vertical;
    font-family: monospace;
}

/* Alias Input */
.alias-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.alias-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.domain-prefix {
    padding: 0.8rem 0.8rem;
    background: var(--bg);
    color: var(--text-light);
    font-size: 0.85rem;
    border-right: 1px solid var(--border);
}

.alias-input {
    flex: 1;
    padding: 0.8rem 0.8rem;
    border: none;
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
    background: var(--surface);
    color: var(--text);
}

.alias-input:focus {
    outline: none;
}

.input-hint {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 0.3rem;
}

/* Alias Availability */
.alias-availability {
    font-size: 0.75rem;
    margin-top: 0.3rem;
}

.alias-available {
    color: #10b981;
}

.alias-taken {
    color: #ef4444;
}

.alias-invalid {
    color: #f59e0b;
}

.alias-suggestions {
    margin-top: 0.3rem;
    color: var(--text-light);
}

.suggestion-chip {
    display: inline-block;
    background: var(--bg);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    margin: 0.2rem;
    cursor: pointer;
    font-size: 0.7rem;
    color: var(--primary);
    transition: all 0.2s;
}

.suggestion-chip:hover {
    background: var(--primary);
    color: white;
}

/* UTM Builder */
.utm-builder-section {
    margin-bottom: 1rem;
}

/* Actions */
.urlshortener-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.primary-action-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
}

.primary-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99,102,241,0.3);
}

.secondary-action-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.7rem 1.5rem;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-action-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Loading */
.loading-indicator {
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 0.8rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Results */
.urlshortener-results {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: 16px;
    padding: 1.2rem;
    margin-top: 1rem;
    color: white;
}

.result-header {
    margin-bottom: 0.8rem;
}

.result-label {
    font-weight: 700;
}

.result-link-container {
    display: flex;
    gap: 0.8rem;
}

.result-input {
    flex: 1;
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 10px;
    background: rgba(255,255,255,0.2);
    color: white;
    font-family: monospace;
    font-size: 0.85rem;
}

.result-input::placeholder {
    color: rgba(255,255,255,0.6);
}

.result-actions {
    display: flex;
    gap: 0.5rem;
}

.stats-info {
    display: flex;
    gap: 1rem;
    font-size: 0.7rem;
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

/* Social Share Buttons */
.social-share-section {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.social-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.social-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255,255,255,0.2);
    color: white;
}

.social-btn:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.3);
}

/* Bulk Results */
.bulk-results {
    max-height: 300px;
    overflow-y: auto;
}

.bulk-result-item {
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: var(--bg);
    font-size: 13px;
}

.bulk-result-item.success {
    border-left: 3px solid #10b981;
}

.bulk-result-item.error {
    border-left: 3px solid #ef4444;
    color: #ef4444;
}

.bulk-result-item a {
    color: var(--primary);
    text-decoration: none;
}

.copy-bulk-btn {
    margin-left: 10px;
    padding: 2px 8px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 11px;
}

/* Stats Check Form */
.stats-check-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.stats-input-group {
    flex: 1;
    min-width: 200px;
}

/* Stats Result Area */
.stats-result-area {
    margin-top: 1.5rem;
}

.stats-result-card {
    background: var(--bg);
    border-radius: 16px;
    padding: 1.2rem;
    border: 1px solid var(--border);
}

.stats-result-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border);
}

.stats-result-icon {
    font-size: 1.5rem;
}

.stats-details {
    display: grid;
    gap: 0.8rem;
}

.stat-detail-item {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0.5rem;
    background: var(--surface);
    border-radius: 10px;
}

.stat-detail-label {
    font-size: 0.8rem;
    color: var(--text-light);
}

.stat-detail-value {
    font-weight: 600;
    color: var(--primary);
    word-break: break-all;
    text-align: right;
}

/* Leaderboard */
.leaderboard-list {
    max-height: 300px;
    overflow-y: auto;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--border);
}

.leaderboard-rank {
    width: 40px;
    font-weight: 800;
    font-size: 1.2rem;
}

.leaderboard-name {
    flex: 1;
}

.leaderboard-count {
    font-weight: 600;
    color: var(--primary);
}

/* Trending */
.trending-links {
    max-height: 300px;
    overflow-y: auto;
}

.trending-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--border);
}

.trending-rank {
    font-size: 1.2rem;
    margin-right: 10px;
}

.trending-link {
    flex: 1;
    color: var(--primary);
    text-decoration: none;
    font-family: monospace;
}

.trending-link:hover {
    text-decoration: underline;
}

.trending-clicks {
    font-size: 12px;
    color: var(--text-light);
}

/* Recent URLs */
.recent-urls-list {
    max-height: 400px;
    overflow-y: auto;
}

.recent-url-item {
    background: var(--bg);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.8rem;
    border: 1px solid var(--border);
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recent-url-item:hover {
    transform: translateX(4px);
}

.recent-url-info {
    flex: 1;
}

.recent-url-short {
    margin-bottom: 0.5rem;
}

.url-icon {
    margin-right: 0.5rem;
}

.short-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
}

.short-link:hover {
    text-decoration: underline;
}

.protected-badge {
    margin-left: 5px;
    font-size: 10px;
}

.recent-url-long {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.recent-url-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.6rem;
    color: var(--text-light);
}

.copy-recent-btn {
    padding: 6px 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 11px;
}

/* Referral Section */
.referral-link-container {
    display: flex;
    gap: 10px;
}

/* API Section */
.api-example {
    background: var(--bg);
    padding: 12px;
    border-radius: 10px;
    font-family: monospace;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.api-example code {
    word-break: break-all;
}

/* Reference Section */
.urlshortener-reference {
    margin-top: 2rem;
}

.urlshortener-reference h3 {
    margin-bottom: 1rem;
    color: var(--text);
}

.reference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.ref-card {
    background: var(--bg);
    border-radius: 16px;
    padding: 1rem;
    border: 1px solid var(--border);
}

.ref-card h4 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.ref-card p {
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* Error Message */
.error-message {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #991b1b;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
    .urlshortener-container {
        padding: 0 1rem;
    }
    
    .urlshortener-title {
        font-size: 2rem;
    }
    
    .urlshortener-stats-banner {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stats-check-form {
        flex-direction: column;
    }
    
    .stats-input-group {
        width: 100%;
    }
    
    .result-link-container {
        flex-direction: column;
    }
    
    .stat-detail-item {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .stat-detail-value {
        text-align: left;
    }
    
    .urlshortener-actions {
        flex-direction: column;
    }
    
    .recent-url-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .copy-recent-btn {
        align-self: flex-start;
    }
    
    .social-buttons {
        justify-content: center;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .api-example {
        background: #1a1a2e;
    }
}

/* Add these new styles to your existing style.css */

/* Password Checkbox Styling */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text);
    user-select: none;
    margin-bottom: 10px;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: var(--surface);
    border: 2px solid var(--border);
    border-radius: 6px;
    transition: all 0.2s;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--primary);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-text {
    margin-left: 5px;
}

/* Password Field */
.password-field {
    margin-top: 10px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper .urlshortener-input {
    flex: 1;
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    color: var(--text-light);
    transition: all 0.2s;
}

.password-toggle:hover {
    color: var(--primary);
    transform: scale(1.1);
}

/* QR Code Container Styling */
#qrCodeContainer {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 24px;
    padding: 20px;
    margin-top: 20px;
}

#qrCode {
    display: inline-block;
    background: white;
    border-radius: 20px;
    padding: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

#qrCode img {
    display: block;
    margin: 0 auto;
    border-radius: 12px;
}

.qr-save-btn {
    margin-top: 15px;
    padding: 10px 28px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}

.qr-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99,102,241,0.4);
}

.qr-save-btn:active {
    transform: translateY(0);
}
/* API Details Section */
.api-details {
    margin-top: 15px;
}

.api-details h4 {
    font-size: 0.9rem;
    margin: 15px 0 8px 0;
    color: var(--primary);
}

.api-usage {
    background: var(--bg);
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 0.8rem;
    line-height: 1.6;
}

.api-usage p {
    margin: 8px 0;
}

/* SEO Content Styling */
.urlshortener-seo {
    margin-top: 40px;
    padding: 30px;
    background: var(--bg);
    border-radius: 20px;
    border: 1px solid var(--border);
}

.urlshortener-seo h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text);
}

.urlshortener-seo h3 {
    font-size: 1.3rem;
    margin: 30px 0 15px 0;
    color: var(--text);
}

.urlshortener-seo p {
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 15px;
}

.seo-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.seo-feature {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.seo-feature:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.seo-icon {
    font-size: 2rem;
}

.seo-feature h4 {
    margin: 0 0 5px 0;
    color: var(--primary);
}

.seo-feature p {
    margin: 0;
    font-size: 0.8rem;
}

.seo-list {
    padding-left: 20px;
    margin: 15px 0;
}

.seo-list li {
    margin: 10px 0;
    line-height: 1.6;
    color: var(--text-light);
}

.seo-faq {
    margin: 20px 0;
}

.faq-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.faq-item h4 {
    margin: 0 0 8px 0;
    color: var(--primary);
    cursor: pointer;
}

.faq-item p {
    margin: 0;
    font-size: 0.9rem;
    display: none;
}

.faq-item.active p {
    display: block;
}

.faq-item h4::before {
    content: "▶ ";
    font-size: 10px;
    display: inline-block;
    transition: transform 0.2s;
}

.faq-item.active h4::before {
    transform: rotate(90deg);
}

.seo-cta {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: 20px;
    margin-top: 30px;
    color: white;
}

.seo-cta h3 {
    color: white;
    margin-top: 0;
}

.seo-cta p {
    color: rgba(255,255,255,0.9);
}

.scroll-to-top-btn {
    background: white;
    color: var(--primary);
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 15px;
}

.scroll-to-top-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Autocomplete off indicator */
/* input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--surface) inset !important;
} */

/* Responsive */
@media (max-width: 768px) {
    .urlshortener-stats-banner {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .seo-features {
        grid-template-columns: 1fr;
    }
    
    .urlshortener-seo {
        padding: 20px;
    }
    
    .seo-cta {
        padding: 20px;
    }
}

/* Alias Suggestions Grid */
.alias-suggestions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.suggestion-card {
    background: linear-gradient(135deg, var(--bg), var(--surface));
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.suggestion-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99,102,241,0.2);
    background: var(--primary-light);
}

.suggestion-alias {
    font-family: monospace;
    font-weight: 600;
    color: var(--primary);
    font-size: 14px;
}

.suggestion-badge {
    background: #10b981;
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 500;
}

.alias-suggestions-title {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

.alias-taken {
    color: #ef4444;
    font-size: 13px;
    margin-bottom: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .alias-suggestions-grid {
        flex-direction: column;
    }
    
    .suggestion-card {
        justify-content: space-between;
    }
}