/**
 * Main stylesheet for LinkTree Clone
 */

:root {
    --primary-color: #6366f1;
    --secondary-color: #4f46e5;
    --text-color: #1f2937;
    --bg-color: #ffffff;
    --card-bg: #f3f4f6;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --hover-color: #4f46e5;
    --error-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --info-color: #3498db;
}

/* Dark theme variables */
.dark-theme {
    --primary-color: #818cf8;
    --secondary-color: #6366f1;
    --text-color: #f3f4f6;
    --bg-color: #111827;
    --card-bg: #1f2937;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --hover-color: #818cf8;
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 1rem;
}

.container {
    max-width: 680px;
    width: 100%;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--bg-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px var(--shadow-color);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* Input groups with icons */
.input-group {
    position: relative;
}

.input-group input {
    padding-right: 40px; /* Space for the icon */
}

.input-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1rem;
    pointer-events: none;
}

/* Form elements */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.full-width {
    width: 100%;
}

input.full-width,
select.full-width {
    width: 100%;
    padding: 10px;
}

input.code,
textarea.code {
    font-family: monospace;
}

small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.8rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.3s;
}

.btn:hover {
    background-color: var(--hover-color);
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-danger {
    background-color: var(--error-color);
}

.btn-success {
    background-color: var(--success-color);
}

/* Checkbox styling */
.checkbox-group {
    display: flex;
    align-items: center;
    margin: 10px 0;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
}

/* Alert messages */
.alert {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 6px;
    border-left: 3px solid;
    display: flex;
    align-items: flex-start;
}

.alert i {
    margin-right: 10px;
    font-size: 18px;
}

.alert-error {
    background-color: #FEF2F2;
    color: #B91C1C;
    border-color: #DC2626;
}

.alert-warning {
    background-color: #FFFBEB;
    color: #92400E;
    border-color: #D97706;
}

.alert-info {
    background-color: #EFF6FF;
    color: #1E40AF;
    border-color: #3B82F6;
}

.alert-success {
    background-color: #ECFDF5;
    color: #065F46;
    border-color: #10B981;
}

/* Section styling */
.section {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
    margin-bottom: 2rem;
}

.section h2 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

/* Card styling */
.card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
    margin-bottom: 1.5rem;
}

/* Profile section */
.profile-section {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px var(--shadow-color);
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease-in-out;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    border: 3px solid var(--primary-color);
    box-shadow: 0 4px 6px var(--shadow-color);
    overflow: hidden;
    background-color: var(--bg-color);
    position: relative;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.profile-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-color);
}

.profile-image-placeholder i {
    font-size: 4rem;
    color: var(--primary-color);
}

.profile-name {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.profile-bio {
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
}

/* Social links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-link {
    color: var(--text-color);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.social-link:hover {
    opacity: 1;
    transform: translateY(-2px);
    color: var(--primary-color);
}

/* Links container */
.links-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.link-card {
    background-color: var(--card-bg);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    position: relative;
}

.link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px var(--shadow-color);
    background-color: var(--primary-color);
    color: white;
}

.link-card i {
    font-size: 1.25rem;
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.link-card span {
    width: 100%;
    font-weight: 500;
    text-align: center;
}

/* Admin link */
.admin-link {
    position: fixed;
    bottom: 20px;
    right: 20px;
    opacity: 0.3;
    transition: opacity 0.3s ease;
    background-color: var(--card-bg);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px var(--shadow-color);
    backdrop-filter: blur(10px);
}

.admin-link:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.admin-link a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 0.5rem 0;
    color: var(--text-color);
    opacity: 0.4;
    font-size: 0.75rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: transparent;
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
}

.footer:hover {
    opacity: 0.7;
}

.footer p {
    margin: 0;
    padding: 0;
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer a:hover {
    opacity: 0.8;
}

/* Admin dashboard specific 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;
}

.dashboard-title {
    font-size: 2rem;
    color: var(--text-color);
}

.logout-btn {
    padding: 0.5rem 1rem;
    background-color: #f3f4f6;
    color: #333;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #e5e7eb;
}

/* Image upload section */
.image-upload-section {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.image-upload-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--text-color);
}

.image-settings {
    margin-top: 1rem;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive styles */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .profile-section {
        padding: 1.5rem;
    }
    
    .profile-image {
        width: 120px;
        height: 120px;
    }
    
    .profile-name {
        font-size: 1.5rem;
    }
    
    .link-card {
        padding: 0.75rem 1rem;
    }
    
    .link-card i {
        font-size: 1rem;
        left: 1rem;
    }
}

@media (max-width: 480px) {
    .profile-image {
        width: 100px;
        height: 100px;
    }
    
    .profile-name {
        font-size: 1.25rem;
    }
    
    .profile-bio {
        font-size: 0.9rem;
    }
    
    .social-link {
        font-size: 1.25rem;
    }
}

/* Debug styles */
.debug-info {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.code {
    font-family: monospace;
    background: #f4f4f4;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

/* GDPR Consent Banner */
.consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--card-bg);
    box-shadow: 0 -2px 10px var(--shadow-color);
    padding: 15px;
    z-index: 1000;
    border-top: 1px solid var(--border-color);
}

.consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.consent-content p {
    flex: 1;
    min-width: 200px;
}

.consent-buttons {
    display: flex;
    gap: 10px;
}

.consent-accept {
    padding: 8px 16px;
    background-color: var(--success-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.2s ease;
}

.consent-accept:hover {
    background-color: #27ae60;
}

.consent-decline {
    padding: 8px 16px;
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.2s ease;
}

.consent-decline:hover {
    background-color: var(--border-color);
}

@media (max-width: 600px) {
    .consent-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .consent-buttons {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Privacy Policy Styles */
.privacy-content {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px var(--shadow-color);
}

.privacy-section {
    margin-bottom: 25px;
}

.privacy-section h2 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--primary-color);
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
}

.privacy-section p {
    margin-bottom: 15px;
}

.privacy-section ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.privacy-section li {
    margin-bottom: 8px;
}

.back-link {
    margin-bottom: 30px;
    text-align: center;
}

.privacy-link {
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.privacy-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Error page styles */
.error-container {
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    background-color: #FEF2F2;
    border-radius: 8px;
    border-left: 5px solid #DC2626;
    font-family: Arial, sans-serif;
    color: #1F2937;
}

.error-container h1 {
    color: #991B1B;
    margin-top: 0;
}

.error-container .error-details {
    background-color: #FEE2E2;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
    font-family: monospace;
    overflow-x: auto;
}

.error-container .error-actions {
    margin-top: 20px;
}

.error-container .error-actions a {
    display: inline-block;
    padding: 8px 16px;
    background-color: #EF4444;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-right: 10px;
}

.error-container .error-actions a:hover {
    background-color: #DC2626;
}

/* Cookie Consent Banner */
.cookie-consent {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none; /* Hidden by default, shown via JS */
    max-width: 500px;
    margin: 0 auto;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.cookie-consent p {
    margin: 0 0 15px 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-accept, .btn-decline {
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-accept {
    background-color: var(--primary-color);
    color: white;
}

.btn-accept:hover {
    background-color: var(--primary-color);
    opacity: 0.9;
}

.btn-decline {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.btn-decline:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .cookie-consent {
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 8px 8px 0 0;
        max-width: 100%;
    }
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.bio {
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

main {
    margin-bottom: 2rem;
}

.link-item {
    display: block;
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px var(--shadow-color);
}

.link-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color);
    background-color: var(--primary-color);
    color: white;
}

.no-links {
    text-align: center;
    color: var(--text-color);
    opacity: 0.7;
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: 8px;
}

footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.9rem;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Add styles for favicon icons */
.favicon-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 8px;
}

/* Ensure the link icon has proper alignment */
.link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
} 