/* ReURL Link - Main Stylesheet */
/* Brutalist Design System */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: #dddddd;
    color: #000000;
    line-height: 1.6;
}

/* Header */
.header {
    border-bottom: 4px solid #000000;
    padding: 1.5rem 1rem;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: -1px;
    text-decoration: none;
    color: #000000;
}

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

.nav-link {
    background: none;
    border: none;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    color: #000000;
}

.nav-link:hover {
    text-decoration: underline;
}

@media (min-width: 768px) {
    .logo {
        font-size: 2.5rem;
    }
    .nav {
        display: flex;
    }
}

/* Hero Section */
.hero {
    border-bottom: 4px solid #000000;
    padding: 4rem 1rem;
}

.hero-container {
    max-width: 1000px;
    margin: 0 auto;
}

.hero-title {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-title h1 {
    font-size: 2.5rem;
    font-weight: bold;
    letter-spacing: -1px;
    margin-bottom: 1rem;
}

.hero-title p {
    font-size: 1.25rem;
    color: #666666;
}

@media (min-width: 768px) {
    .hero {
        padding: 6rem 1rem;
    }
    .hero-title h1 {
        font-size: 4rem;
    }
}

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

.url-input {
    width: 100%;
    border: 4px solid #000000;
    padding: 1.25rem 1.5rem;
    font-size: 1.125rem;
    font-weight: 500;
    outline: none;
    margin-bottom: 1rem;
}

.url-input::placeholder {
    color: #999999;
}

.shorten-btn {
    width: 100%;
    background: #000000;
    color: #ffffff;
    border: 4px solid #000000;
    padding: 1.25rem;
    font-size: 1.125rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.shorten-btn:hover {
    background: #333333;
}

.shorten-btn:disabled {
    background: #666666;
    cursor: not-allowed;
}

@media (min-width: 768px) {
    .url-input {
        padding: 1.5rem 1.5rem;
        font-size: 1.25rem;
    }
    .shorten-btn {
        padding: 1.5rem;
        font-size: 1.25rem;
    }
}

/* Features */
.features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .features {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    border: 4px solid #000000;
    padding: 2rem 1.5rem;
    text-align: center;
    background: #ffffff;
}

.feature-icon {
    width: 2rem;
    height: 2rem;
    margin: 0 auto 1rem;
}

.feature-card h3 {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.875rem;
    color: #666666;
}

/* Results Section (inline - below Shorten button) */
.results-inline {
    display: none;
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.results-inline.active {
    display: block;
}

.results-inline h2 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Old Results Section (separate section - kept for backwards compatibility) */
.results {
    border-bottom: 4px solid #000000;
    background: #f5f5f5;
    padding: 4rem 1rem;
    display: none;
}

.results.active {
    display: block;
}

.results-container {
    max-width: 1000px;
    margin: 0 auto;
}

.results h2 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 2rem;
}

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

.result-card {
    border: 4px solid #000000;
    background: #ffffff;
    padding: 1.5rem;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #000000;
    gap: 1rem;
}

.result-urls {
    flex: 1;
    min-width: 0;
}

.shortened-url {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shortened-url a {
    color: #000000;
    text-decoration: none;
}

.shortened-url a:hover {
    text-decoration: underline;
}

.original-url {
    font-size: 0.875rem;
    color: #666666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-btn {
    border: 4px solid #000000;
    background: #ffffff;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: #000000;
    color: #ffffff;
}

.copy-btn svg {
    display: block;
    width: 1.5rem;
    height: 1.5rem;
}

.result-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
}

.result-stats span {
    font-weight: bold;
}

/* Stats Section */
.stats {
    border-bottom: 4px solid #000000;
    padding: 4rem 1rem;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    border: 4px solid #000000;
    padding: 2rem 1.5rem;
    text-align: center;
    background: #ffffff;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .stat-number {
        font-size: 3rem;
    }
}

.stat-label {
    font-size: 0.875rem;
    font-weight: bold;
}

/* Footer */
.footer {
    background: #000000;
    color: #ffffff;
    padding: 3rem 1rem;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-section h4 {
    font-weight: bold;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.footer-section h5 {
    font-weight: bold;
    margin-bottom: 1rem;
}

.footer-section p {
    color: #999999;
    font-size: 0.875rem;
}

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

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

.footer-section a {
    color: #999999;
    text-decoration: none;
    font-size: 0.875rem;
}

.footer-section a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 2px solid #333333;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: #999999;
}

/* Login/Auth Styles */
.login-container {
    max-width: 500px;
    margin: 0 auto;
}

.login-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: #ffffff;
    border: 4px solid #000000;
    padding: 1.25rem;
    font-size: 1.125rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1rem;
}

.login-btn:hover {
    background: #000000;
    color: #ffffff;
}

.google-btn {
    background: #ffffff;
    color: #000000;
}

.login-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 2px;
    background: #000000;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.divider span {
    background: #ffffff;
    padding: 0 1rem;
    font-weight: bold;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.875rem;
}

.auth-link {
    color: #000000;
    font-weight: bold;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.error-message,
.success-message {
    border: 4px solid #000000;
    padding: 1rem;
    margin-top: 1rem;
    font-weight: bold;
}

.error-message {
    background: #ffebee;
    color: #c62828;
}

.success-message {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Dashboard Styles */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 4px solid #000000;
}

.dashboard-title h1 {
    font-size: 2.5rem;
    font-weight: bold;
}

.user-info {
    text-align: right;
}

.user-email {
    font-size: 0.875rem;
    color: #666666;
    margin-bottom: 0.5rem;
}

.logout-btn {
    background: #ffffff;
    border: 2px solid #000000;
    padding: 0.5rem 1rem;
    font-weight: bold;
    cursor: pointer;
}

.logout-btn:hover {
    background: #000000;
    color: #ffffff;
}

.url-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.url-card {
    border: 4px solid #000000;
    padding: 1.5rem;
    background: #ffffff;
}

.url-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #000000;
}

.url-info {
    flex: 1;
}

.short-url {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.long-url {
    font-size: 0.875rem;
    color: #666666;
    word-break: break-all;
}

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

.action-btn {
    border: 2px solid #000000;
    background: #ffffff;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: bold;
}

.action-btn:hover {
    background: #000000;
    color: #ffffff;
}

.url-analytics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .url-analytics {
        grid-template-columns: repeat(4, 1fr);
    }
}

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

.analytics-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.analytics-label {
    font-size: 0.75rem;
    font-weight: bold;
    color: #666666;
}

/* Utilities */
.hidden {
    display: none;
}

.loading {
    text-align: center;
    padding: 2rem;
    font-size: 1.125rem;
    font-weight: bold;
}
