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

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --error-color: #ef4444;
    --info-color: #3b82f6;
    --bg-color: #f9fafb;
    --card-bg: #ffffff;
    --text-color: #111827;
    --border-color: #e5e7eb;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

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

/* Navbar */
.navbar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a:not(.btn-primary):not(.btn-secondary):not(.btn-danger) {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s;
}

.nav-menu a:not(.btn-primary):not(.btn-secondary):not(.btn-danger):hover {
    color: var(--primary-color);
}

/* Alerts */
.alert {
    padding: 1rem;
    margin: 1rem auto;
    max-width: 1200px;
    border-radius: 8px;
    font-weight: 500;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-danger {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-danger {
    background: var(--error-color);
    color: white;
}

.btn-block {
    width: 100%;
    text-align: center;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 5rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* Features */
.features {
    padding: 4rem 0;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

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

.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* CTA Section */
.cta {
    text-align: center;
    padding: 4rem 0;
    background: var(--bg-color);
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Auth Section */
.auth-section {
    padding: 4rem 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.auth-card {
    max-width: 450px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.auth-card h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.auth-footer {
    text-align: center;
    margin-top: 1rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Dashboard */
.dashboard {
    padding: 3rem 0;
    min-height: 70vh;
}

.dashboard h1 {
    margin-bottom: 2rem;
}

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

.stat-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    color: var(--secondary-color);
    font-size: 0.875rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.subscription-info, .upgrade-prompt, .quick-actions {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.create-url-form {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.create-url-form .form-group {
    display: flex;
    gap: 1rem;
}

.create-url-form input {
    flex: 1;
}

.urls-list {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th, .data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--bg-color);
    font-weight: 600;
}

.data-table td a {
    word-break: break-all;
}

.truncate {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-warning {
    background: #fef3c7;
    color: #92400e;
}

.status-error {
    background: #fee2e2;
    color: #991b1b;
}

/* Pricing */
.pricing-section {
    padding: 4rem 0;
}

.pricing-section h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.pricing-section > .container > p {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--secondary-color);
}

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

.pricing-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.pricing-card.current-plan {
    border: 2px solid var(--primary-color);
    position: relative;
}

.current-plan-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 10px;
}

.price {
    font-size: 3rem;
    font-weight: bold;
    margin: 1.5rem 0;
    color: var(--primary-color);
}

.price .currency {
    font-size: 1.5rem;
}

.price .period {
    font-size: 1rem;
    color: var(--secondary-color);
}

.pricing-card .features {
    list-style: none;
    margin: 2rem 0;
    text-align: left;
}

.pricing-card .features li {
    padding: 0.5rem 0;
}

/* Success Page */
.success-section {
    padding: 4rem 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.success-card {
    max-width: 600px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.success-details {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    text-align: left;
}

/* Page Section */
.page-section {
    padding: 3rem 0;
    min-height: 70vh;
}

.page-section h1 {
    margin-bottom: 2rem;
}

.page-section h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.page-section ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.contact-info, .contact-form {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Footer */
.footer {
    background: var(--text-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
}

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

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

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .pricing-grid, .feature-grid {
        grid-template-columns: 1fr;
    }

    .data-table thead {
        display: none;
    }

    .data-table tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 1rem;
        background: #fff;
    }

    .data-table td {
        display: block;
        padding: 0.4rem 0;
        border-bottom: none;
        text-align: left;
    }

    .data-table td::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        font-size: 0.75rem;
        color: #666;
        margin-bottom: 2px;
        text-transform: uppercase;
    }

    .data-table td a {
        word-break: break-all;
    }

    .truncate {
        max-width: 100%;
        white-space: normal;
        word-break: break-all;
    }

    .create-url-form .form-group {
        flex-direction: column;
    }

    .create-url-form .form-group input {
        width: 100%;
    }
}
