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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 800px;
}

/* Auth Section */
.auth-section {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 10px;
}

.auth-header p {
    color: #6b7280;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e5e7eb;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    margin-bottom: 20px;
    color: #1f2937;
}

/* App Section */
.app-section {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.app-header h1 {
    font-size: 2rem;
    color: #667eea;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    font-weight: 500;
    color: #1f2937;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

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

.form-group small {
    display: block;
    margin-top: 5px;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-danger {
    background: #ef4444;
    color: white;
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Messages */
.error-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    background: #fee2e2;
    color: #dc2626;
    display: none;
}

.error-message.show {
    display: block;
}

.success-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    background: #d1fae5;
    color: #059669;
    display: none;
}

.success-message.show {
    display: block;
}

/* Create Link Section */
.create-link-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e5e7eb;
}

.create-link-section h2 {
    margin-bottom: 20px;
    color: #1f2937;
}

/* Links Section */
.links-section h2 {
    margin-bottom: 20px;
    color: #1f2937;
}

.links-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.loading {
    text-align: center;
    color: #6b7280;
    padding: 20px;
}

.link-card {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
}

.link-card:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

.link-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.link-url {
    font-size: 0.875rem;
    color: #6b7280;
    word-break: break-all;
    margin-bottom: 10px;
}

.link-short {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.link-short a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
}

.link-short a:hover {
    text-decoration: underline;
}

.copy-btn {
    padding: 6px 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #5568d3;
}

.link-meta {
    display: flex;
    gap: 15px;
    font-size: 0.875rem;
    color: #6b7280;
    flex-wrap: wrap;
}

.link-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.expired {
    color: #ef4444;
    font-weight: 500;
}

/* Error Page */
.error-page {
    background: white;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.error-page h1 {
    font-size: 6rem;
    color: #667eea;
    margin-bottom: 10px;
}

.error-page h2 {
    font-size: 2rem;
    color: #1f2937;
    margin-bottom: 15px;
}

.error-page p {
    color: #6b7280;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.error-page .btn {
    width: auto;
    display: inline-block;
}

/* Responsive */
@media (max-width: 640px) {
    .auth-section,
    .app-section,
    .error-page {
        padding: 20px;
    }

    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .link-card-header {
        flex-direction: column;
        gap: 10px;
    }
}
