/* URL Shortener Tool Styles */
.url-shortener-tool {
    min-height: 100vh;
    background: white;
    padding: 2rem 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.tool-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 3rem;
    color: #333;
}

.tool-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.tool-header h1 i {
    margin-right: 1rem;
    color: #2c8462;
}

.tool-description {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Shortener Interface */
.shortener-interface {
    margin-bottom: 3rem;
}

.shortener-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Input Section */
.input-section {
    margin-bottom: 2rem;
}

.input-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.8rem;
}

.url-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.url-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #333;
}

.url-input:focus {
    outline: none;
    border-color: #2c8462;
    background: white;
    box-shadow: 0 0 0 3px rgba(44, 132, 98, 0.1);
}

.clear-btn {
    position: absolute;
    right: 1rem;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
}

.url-input:not(:placeholder-shown) + .clear-btn {
    opacity: 1;
    transform: scale(1);
}

.clear-btn:hover {
    background: #ff5252;
    transform: scale(1.1);
}

.input-hint {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-hint i {
    color: #2c8462;
}

/* Action Controls */
.action-controls {
    text-align: center;
    margin-bottom: 2rem;
}

.shorten-btn {
    background: linear-gradient(135deg, #2c8462 0%, #1e5f47 100%);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 4px 15px rgba(44, 132, 98, 0.3);
}

.shorten-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(44, 132, 98, 0.4);
}

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

.shorten-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Result Section */
.result-section {
    border-top: 2px solid #f0f0f0;
    padding-top: 2rem;
    animation: slideIn 0.5s ease-out;
}

.result-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.result-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.url-result {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.shortened-url:last-child {
    margin-bottom: 0;
}

.url-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.url-value {
    font-size: 1rem;
    color: #333;
    word-break: break-all;
    padding: 0.8rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.url-value-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.url-value-container .url-value {
    flex: 1;
}

.copy-btn {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.8rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
}

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

.copy-btn.copied {
    background: #17a2b8;
}

.copy-btn.copied::before {
    content: "✓";
    margin-right: 0.3rem;
}

/* Result Actions */
.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.visit-btn {
    background: #007bff;
    color: white;
}

.visit-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.share-btn {
    background: #6f42c1;
    color: white;
}

.share-btn:hover {
    background: #5a2d91;
    transform: translateY(-1px);
}

/* URL Details */
.url-details {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.details-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.detail-label {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-value {
    font-weight: 600;
    color: #333;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2c8462;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Messages */
.error-message,
.success-message {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 500;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Recent URLs */
.recent-urls {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.recent-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.recent-list {
    margin-bottom: 1.5rem;
}

.recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    border: 1px solid #e1e5e9;
}

.recent-item:last-child {
    margin-bottom: 0;
}

.recent-urls-info {
    flex: 1;
    margin-right: 1rem;
}

.recent-original {
    font-size: 0.9rem;
    color: #666;
    word-break: break-all;
    margin-bottom: 0.3rem;
}

.recent-short {
    font-size: 1rem;
    color: #007bff;
    font-weight: 500;
    word-break: break-all;
}

.recent-actions {
    display: flex;
    gap: 0.5rem;
}

.recent-copy-btn,
.recent-visit-btn {
    padding: 0.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
}

.recent-copy-btn {
    background: #28a745;
    color: white;
}

.recent-copy-btn:hover {
    background: #218838;
}

.recent-visit-btn {
    background: #007bff;
    color: white;
}

.recent-visit-btn:hover {
    background: #0056b3;
}

.clear-history-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.clear-history-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Popular Examples */
.popular-examples {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.popular-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

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

.example-item {
    padding: 1.2rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.example-item:hover {
    border-color: #2c8462;
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(44, 132, 98, 0.1);
}

.example-label {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.example-url {
    font-size: 0.9rem;
    color: #666;
    word-break: break-all;
    line-height: 1.4;
}

/* SEO Content */
.seo-content {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    margin-top: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    color: #333;
    line-height: 1.7;
}

.seo-content h2 {
    color: #333;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    margin-top: 2.5rem;
}

.seo-content h2:first-child {
    margin-top: 0;
}

.seo-content h3 {
    color: #555;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.seo-content p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.seo-content ul,
.seo-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.seo-content li {
    margin-bottom: 0.8rem;
}

.seo-content strong {
    color: #333;
    font-weight: 600;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Related Tools Section */
.related-tools-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.related-tools-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.related-tools-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.related-tools-header h3 i {
    color: #2c8462;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.related-tool-link {
    background: #f8fafc;
    color: #2c8462;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    border: 1px solid #e5e7eb;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.related-tool-link:hover {
    background: #2c8462;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.related-tool-link i {
    font-size: 0.875rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .url-shortener-tool {
        padding: 1rem 0.5rem;
    }

    .tool-header h1 {
        font-size: 2.2rem;
    }

    .tool-description {
        font-size: 1rem;
    }

    .shortener-card {
        padding: 1.5rem;
        border-radius: 15px;
    }

    .url-input {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }

    .shorten-btn {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }

    .result-actions {
        flex-direction: column;
        align-items: center;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
        max-width: 200px;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .examples-grid {
        grid-template-columns: 1fr;
    }

    .recent-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .recent-urls-info {
        margin-right: 0;
        width: 100%;
    }

    .recent-actions {
        align-self: flex-end;
    }

    .seo-content {
        padding: 2rem 1.5rem;
    }

    .seo-content h2 {
        font-size: 1.6rem;
    }

    .seo-content h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .tool-header h1 {
        font-size: 1.8rem;
    }

    .shortener-card {
        padding: 1rem;
    }

    .url-input {
        padding: 0.7rem;
    }

    .shorten-btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }

    .seo-content {
        padding: 1.5rem 1rem;
    }

    .related-tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .related-tool-link {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .related-tools-section {
        padding: 1rem;
    }

    .related-tools-grid {
        grid-template-columns: 1fr;
    }
}
