* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: #667eea;
}

.logo i {
    font-size: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #667eea;
}

.btn-primary {
    background: #667eea;
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background 0.3s !important;
}

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

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-container {
    max-width: 800px;
    padding: 2rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.url-shortener-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.url-shortener-form input {
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.url-shortener-form input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-large {
    background: #667eea;
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

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

/* Result Container */
.result-container {
    margin-top: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    color: #333;
}

.shortened-url {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: #f7f7f7;
    border-radius: 5px;
}

.shortened-url a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.shortened-url button {
    background: #48bb78;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Features Section */
.features {
    padding: 4rem 2rem;
    background: white;
    text-align: center;
}

.features h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    background: #f7f7f7;
    border-radius: 10px;
    transition: transform 0.3s;
}

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

.feature-card i {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: #333;
}

/* Advertisement Banners */
.ad-banner {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 1rem;
    margin: 2rem 0;
}

.ad-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
    color: white;
}

.ad-container span {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
}

.ad-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

/* QR Generator */
.qr-generator {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    text-align: center;
}

.qr-generator h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #333;
}

.qr-container {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.qr-container input {
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
}

.btn-secondary {
    background: #764ba2;
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-secondary:hover {
    background: #667eea;
}

.qr-result {
    margin-top: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    display: none;
}

.qr-result.active {
    display: block;
}

.qr-result img {
    max-width: 100%;
    height: auto;
}

/* Subdomains Section */
.subdomains {
    padding: 4rem 2rem;
    background: white;
    text-align: center;
}

.subdomains h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #333;
}

.subdomains-grid {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.subdomain-card {
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    color: white;
}

.subdomain-card h3 {
    margin-bottom: 1rem;
}

.coming-soon {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
}

/* Footer */
footer {
    background: #1a202c;
    color: white;
    padding: 4rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #667eea;
}

.footer-section a {
    display: block;
    color: #a0aec0;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

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

.social-links a {
    font-size: 1.5rem;
}

.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid #2d3748;
    text-align: center;
    color: #a0aec0;
}

/* Dashboard Styles */
.dashboard {
    display: flex;
    min-height: calc(100vh - 80px);
    background: #f7f7f7;
}

.dashboard-sidebar {
    width: 250px;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.user-profile {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.user-profile i {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-menu li {
    padding: 1rem 2rem;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-menu li:hover {
    background: #f0f0f0;
}

.sidebar-menu li.active {
    background: #667eea;
    color: white;
}

.dashboard-main {
    flex: 1;
    padding: 2rem;
}

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

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

.link-card {
    background: white;
    padding: 1rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.link-card h4 {
    margin-bottom: 0.5rem;
    color: #667eea;
}

.link-card p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

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

.link-actions button {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-edit {
    background: #667eea;
    color: white;
}

.btn-delete {
    background: #f56565;
    color: white;
}

.btn-qr {
    background: #48bb78;
    color: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 10px;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-content input {
    width: 100%;
    padding: 0.75rem;
    margin: 0.5rem 0;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .dashboard {
        flex-direction: column;
    }
    
    .dashboard-sidebar {
        width: 100%;
    }
    
    .subdomains-grid {
        grid-template-columns: 1fr;
    }
/* Add these styles to your existing styles.css */

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.1rem;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-left: 10px;
    border: 2px solid #667eea;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Sidebar Advertisement */
.sidebar-ad {
    margin-top: 2rem;
    padding: 1rem;
}

.sidebar-ad .ad-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
}

.sidebar-ad .ad-container span {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.sidebar-ad .ad-container p {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.sidebar-ad .ad-container small {
    opacity: 0.9;
    font-size: 0.8rem;
}

/* Link Card Enhancements */
.link-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.link-url {
    color: #4a5568;
    margin: 0.5rem 0;
    word-break: break-all;
}

.link-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.link-actions button {
    padding: 0.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: opacity 0.3s;
}

.link-actions button:hover {
    opacity: 0.9;
}

/* QR Result Area */
.qr-result {
    margin-top: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    text-align: center;
    display: none;
}

.qr-result.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.qr-result img {
    max-width: 200px;
    height: auto;
    margin-bottom: 1rem;
    border: 1px solid #e0e0e0;
    padding: 10px;
    border-radius: 5px;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .link-actions {
        grid-template-columns: 1fr;
    }
    
    .sidebar-ad {
        display: none;
    }
}