@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

:root {
    --primary: #151515;
    --secondary: #1E1E1E;
    --accent: #252525;
    --highlight: #00C896;
    --text: #FFFFFF;
    --card-bg: #1A1A1A;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    font-family: Pretendard, sans-serif;
    background-color: var(--primary);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

header {
    background-color: var(--secondary);
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.logo a {
    color: var(--highlight);
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

.btn:not(.primary) {
    background-color: var(--accent);
    color: var(--text);
}

.btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 3rem;
    color: var(--highlight);
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text);
    opacity: 0.9;
    margin-bottom: 2rem;
}

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

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

.feature {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.2s ease;
}

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

.feature h3 {
    color: var(--highlight);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.feature p {
    color: var(--text);
    opacity: 0.9;
}

footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--secondary);
    margin-top: 4rem;
}

footer p {
    color: var(--text);
    opacity: 0.7;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #fff;
    color: #333;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.google-btn:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.google-btn.primary {
    background-color: #4285F4;
    color: #fff;
    border: none;
}

.google-btn.primary:hover {
    background-color: #3367d6;
}

.google-btn.large {
    padding: 12px 24px;
    font-size: 1.1em;
}

/* Avatar styling */
.avatar-img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .auth-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

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

/* Link Builder Styles */
.link-builder {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.link-form {
    background-color: #1a1a1a;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #fff;
}

.form-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #333;
    border-radius: 4px;
    background-color: #2a2a2a;
    color: #fff;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #888;
}

.links-list {
    background-color: #1a1a1a;
    padding: 2rem;
    border-radius: 8px;
}

.link-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #333;
    cursor: move;
    position: relative;
    flex-wrap: wrap;
}

.link-item:last-child {
    border-bottom: none;
}

.link-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    width: 100%;
}

.link-content i {
    font-size: 1.5rem;
    color: #fff;
}

.link-title {
    color: #fff;
    font-weight: bold;
}

.link-url {
    color: #888;
    text-decoration: none;
}

.link-url:hover {
    color: #fff;
}

.link-actions {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
}

.no-links {
    text-align: center;
    color: #888;
    padding: 2rem;
}

/* Profile Page */
.profile-page {
    padding-top: 1rem;
}

.profile-page main {
    padding-top: 1.5rem;
}

.profile-container {
    max-width: 800px;
    margin: 2rem auto;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.profile-header {
    display: flex;
    padding: 2rem;
    background-color: var(--user-theme-color);
    color: #fff;
    position: relative;
}

.profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-right: 2rem;
    overflow: hidden;
    flex-shrink: 0;
    background-color: rgba(255, 255, 255, 0.2);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
}

.profile-info {
    flex: 1;
}

.profile-info h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
}

.profile-info .bio {
    margin: 0.5rem 0;
    font-size: 1rem;
    opacity: 0.9;
}

.profile-info .url {
    margin: 1rem 0 0 0;
    opacity: 0.7;
    font-size: 0.9rem;
}

.links-container {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
}

.link-card {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: #f8f8f8;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    border: 1px solid #eee;
}

.link-card:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.link-card i {
    margin-right: 1rem;
    font-size: 1.2rem;
    color: var(--user-theme-color);
    flex-shrink: 0;
}

.link-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.link-card-title {
    font-weight: 600;
    font-size: 1rem;
    color: #333;
}

.link-card-description {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

.no-links {
    text-align: center;
    padding: 2rem;
    color: #777;
}

/* Settings Page */
.settings-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.settings-container h1 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

.profile-section, .url-section {
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.profile-section h2, .url-section h2 {
    margin-top: 0;
    font-size: 1.5rem;
}

.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.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.url-input-group {
    display: flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.url-prefix {
    padding: 0.8rem;
    background-color: #f0f0f0;
    color: #666;
    font-size: 0.9rem;
    border-right: 1px solid #ddd;
    white-space: nowrap;
}

.url-input-group input {
    border: none;
    flex: 1;
}

.url-note {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #777;
}

.url-limit-warning {
    margin-top: 0.5rem;
    color: #e74c3c;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-image-container {
    margin-top: 0.5rem;
}

.profile-preview {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    background-color: var(--secondary);
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
}

.preview-header {
    padding: 2rem 1rem;
    text-align: center;
    color: #fff;
    position: relative;
}

.preview-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.preview-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.default-avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
}

.preview-name {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
}

.preview-bio {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    opacity: 0.9;
    color: #fff;
}

.preview-social-links {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.preview-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.preview-social-link:hover {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.3);
}

.preview-links {
    display: flex !important;
    flex-direction: column !important;
    padding: 1.5rem !important;
    gap: 0.75rem !important;
    background-color: var(--primary) !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 100px !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 10 !important;
}

.preview-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    background-color: var(--accent);
    color: var(--text);
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.preview-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.preview-link i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
    color: var(--highlight);
    flex-shrink: 0;
}

.preview-link img {
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.preview-link-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.preview-link-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
}

.preview-link-description {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 0.25rem;
    color: var(--text);
}

.preview-empty {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    color: #888;
    text-align: center;
    background-color: var(--accent);
    border-radius: 8px;
    margin: 0.5rem 0;
}

.preview-link.thumbnail-style {
    display: grid;
    grid-template-columns: 120px 1fr;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.preview-thumbnail, .preview-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 90px;
}

.preview-thumbnail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent);
    color: var(--text);
}

.preview-thumbnail-placeholder i {
    font-size: 2rem;
    opacity: 0.5;
}

.preview-thumbnail-content {
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.preview-thumbnail-title {
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--text);
}

.preview-thumbnail-description {
    font-size: 0.9rem;
    color: var(--text);
    opacity: 0.8;
}

/* Fix for dark theme compatibility */
.preview-section {
    color: var(--text);
}

.preview-section h3 {
    color: var(--highlight);
    margin-bottom: 1.5rem;
    text-align: center;
}

.link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
    background-color: var(--accent);
    margin-right: 1rem;
}

.link-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-right: 70px; /* Make room for the absolutely positioned actions */
}

.link-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.link-url {
    font-size: 0.8rem;
    opacity: 0.7;
    word-break: break-all;
}

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

.icon-btn {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.icon-btn:hover {
    background-color: var(--accent);
}

.drag-handle {
    cursor: grab;
    padding: 0.5rem;
    color: var(--text);
    opacity: 0.5;
}

.drag-handle:active {
    cursor: grabbing;
}

.hidden {
    display: none;
}

/* Form styling updates */
.social-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    background-color: var(--accent);
    border: none;
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.social-icon-btn:hover {
    background-color: var(--highlight);
    color: var(--primary);
    transform: translateY(-2px);
}

.icon-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.icon-suggestion {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 4px;
    background-color: var(--accent);
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-suggestion:hover {
    background-color: var(--highlight);
    color: var(--primary);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Alert messages */
.alert {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.alert.success {
    background-color: rgba(var(--highlight-rgb), 0.2);
    color: var(--highlight);
    border-left: 4px solid var(--highlight);
}

.alert.error {
    background-color: rgba(var(--danger-rgb), 0.2);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.alert:before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 10px;
}

.alert.success:before {
    content: "\f00c";  /* check mark */
}

.alert.error:before {
    content: "\f071";  /* exclamation triangle */
}

/* Error Page */
.error-container {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.error-container h1 {
    font-size: 8rem;
    margin: 0;
    color: var(--primary-color);
    opacity: 0.2;
    line-height: 1;
}

.error-container h2 {
    margin-top: 0;
}

.error-container p {
    margin-bottom: 2rem;
    color: #666;
}

/* User Dashboard */
.user-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.dashboard-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.dashboard-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--highlight);
}

.dashboard-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--highlight);
}

.dashboard-card p {
    color: var(--text);
    opacity: 0.8;
    font-size: 0.9rem;
}

.profile-url-box {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 2rem;
}

.profile-url-box p {
    margin-bottom: 0.5rem;
    color: var(--text);
    opacity: 0.8;
}

.url-display {
    display: flex;
    align-items: center;
    background-color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.url-display span {
    flex: 1;
    color: var(--highlight);
    font-weight: 500;
    font-family: monospace;
    font-size: 1rem;
}

.copy-btn {
    background-color: var(--highlight);
    color: var(--primary);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .user-dashboard {
        grid-template-columns: 1fr;
    }
}

/* Link Builder with Preview */
.link-builder-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    min-height: 100vh;
}

.editor-section {
    flex: 1;
}

.preview-section {
    position: sticky;
    top: 2rem;
    align-self: flex-start;
    margin-bottom: 2rem;
    z-index: 5;
    overflow: visible;
}

.preview-section h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--highlight);
}

.phone-mockup {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    position: relative;
}

.phone-frame {
    border: 10px solid #000;
    border-radius: 40px;
    overflow: hidden;
    aspect-ratio: 9/19;
    background: #fff;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

.phone-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: #f5f5f5;
    color: #333;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.preview-profile-header {
    padding: 2rem 1.5rem;
    background-color: var(--highlight);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.preview-profile-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-profile-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
}

.preview-profile-info h3 {
    margin: 0;
    font-size: 1.2rem;
}

.preview-bio {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.preview-links-container {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.preview-link-card {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    background-color: #fff;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.preview-link-card:hover {
    transform: translateY(-2px);
}

.preview-link-card i {
    margin-right: 0.75rem;
    font-size: 1rem;
    color: var(--highlight);
}

.preview-no-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #999;
    text-align: center;
    gap: 0.5rem;
}

.temp-preview-link {
    border: 2px dashed var(--highlight);
    background-color: rgba(0, 200, 150, 0.1);
}

@media (max-width: 900px) {
    .link-builder-container {
        grid-template-columns: 1fr;
    }
    
    .preview-section {
        position: static;
        order: -1;
        margin-bottom: 2rem;
    }
    
    .phone-mockup {
        max-width: 280px;
    }
}

/* Social Icons in Profile */
.social-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.25rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

/* Preview Social Icons */
.preview-social-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    justify-content: center;
}

.preview-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.preview-social-icon:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Social Links Section in Link Builder */
.social-links-section, .regular-links-section {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.social-links-section h2, .regular-links-section h2 {
    color: var(--highlight);
    margin-bottom: 0.5rem;
}

.social-links-section p, .regular-links-section p {
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

/* Social Platform Selector */
.social-platforms {
    margin-bottom: 1.5rem;
}

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

.platform-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: var(--accent);
    border: 1px solid #333;
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.platform-btn i {
    font-size: 1.5rem;
}

.platform-btn span {
    font-size: 0.75rem;
}

/* Drag and Drop Reordering */
.sortable-list {
    margin-top: 1rem;
}

.link-item .link-drag-handle {
    margin-right: 0.75rem;
    color: #555;
    cursor: grab;
}

.link-item .link-drag-handle:active {
    cursor: grabbing;
}

.sortable-ghost {
    opacity: 0.4;
    background-color: var(--highlight);
}

.temp-social-icon {
    border: 2px dashed rgba(255, 255, 255, 0.4);
}

/* Social Links List Styling Fix */
.social-links-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
    position: relative;
    overflow: visible;
}

.social-link-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #333;
    background-color: var(--accent);
    border-radius: 6px;
    position: relative;
}

.social-link-item:last-child {
    border-bottom: none;
}

.social-link-item .link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    margin-right: 1rem;
}

.social-link-item .link-icon i {
    font-size: 1.2rem;
    color: var(--highlight);
}

.social-link-item .link-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.social-link-item .link-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.social-link-item .link-url {
    font-size: 0.8rem;
    color: var(--text);
    opacity: 0.7;
    word-break: break-all;
}

.social-link-item .link-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
}

/* Thumbnail and display type options */
.display-type-options {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.display-option {
    cursor: pointer;
    user-select: none;
}

.display-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.option-preview {
    display: flex;
    border: 2px solid var(--accent);
    border-radius: 8px;
    padding: 0.5rem;
    width: 160px;
    height: 100px;
    transition: all 0.2s ease;
}

.display-option input:checked + .option-preview {
    border-color: var(--highlight);
    background-color: rgba(0, 200, 150, 0.1);
}

.icon-preview {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.icon-preview i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--highlight);
}

.thumbnail-preview {
    display: flex;
    overflow: hidden;
}

.thumb-img {
    width: 40%;
    background-color: var(--accent);
    border-radius: 4px;
}

.thumb-content {
    width: 60%;
    padding-left: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.thumb-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.thumb-desc {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* File upload sections */
.custom-icon-upload, .thumbnail-upload {
    margin-top: 0.75rem;
}

.custom-icon-upload {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#selected-icon-file {
    font-size: 0.8rem;
    color: var(--text);
    opacity: 0.7;
}

.thumbnail-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--accent);
    border-radius: 8px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.05);
}

.thumbnail-upload-area:hover {
    border-color: var(--highlight);
    background-color: rgba(0, 200, 150, 0.05);
}

.thumbnail-upload-area i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--highlight);
}

#thumbnail-preview {
    margin-top: 1rem;
    position: relative;
}

#thumbnail-preview img {
    width: 100%;
    border-radius: 8px;
    aspect-ratio: 16/9;
    object-fit: cover;
}

#remove-thumbnail {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    opacity: 0.8;
}

.btn.small {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
}

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

.btn.danger {
    background-color: #e74c3c;
    color: #fff;
}

/* Link with thumbnail display */
.link-item.thumbnail-link {
    padding: 0;
    overflow: hidden;
    display: block;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    position: relative;
}

.thumbnail-link-content {
    display: grid;
    grid-template-columns: 120px 1fr;
    background-color: var(--accent);
}

/* Fix thumbnail link actions positioning to match regular links */
.link-item.thumbnail-link .link-actions {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Make all form inputs have consistent styling */
textarea, input[type="text"], input[type="url"], input[type="email"] {
    width: 100%;
    padding: 0.75rem;
    border-radius: 4px;
    border: 1px solid var(--accent);
    background-color: var(--secondary);
    color: var(--text);
    font-family: Pretendard, sans-serif;
    font-size: 1rem;
    resize: vertical;
}

textarea:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="email"]:focus {
    border-color: var(--highlight);
    outline: none;
}

/* Preview styles for thumbnail links */
.preview-link.thumbnail-style {
    display: grid;
    grid-template-columns: 120px 1fr;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.preview-thumbnail, .preview-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 90px;
}

.preview-thumbnail-content {
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Thumbnail links in profile page */
.link-card.thumbnail-style {
    display: grid;
    grid-template-columns: 120px 1fr;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.link-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 90px;
}

.link-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    color: #666;
    min-height: 90px;
}

.link-thumbnail-content {
    padding: 0.8rem;
    background-color: #f8f8f8;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.link-thumbnail-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.link-thumbnail-description {
    color: #666;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .link-card.thumbnail-style {
        display: grid;
        grid-template-columns: 40% 60%;
        padding: 0;
        height: 100%;
    }
    
    .link-thumbnail, .link-thumbnail-placeholder {
        height: 100%;
        object-fit: cover;
    }
}

@media (max-width: 767px) {
    .link-card.thumbnail-style {
        max-width: 100%;
    }
}

/* View toggle controls */
.view-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    gap: 0.5rem;
}

.view-toggle-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent);
    background-color: var(--secondary);
    color: var(--text);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-toggle-btn.active {
    background-color: var(--highlight);
    color: var(--primary);
    border-color: var(--highlight);
}

/* Mobile preview styling */
.profile-preview.mobile-view {
    max-width: 320px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 8px solid #222;
}

/* Make thumbnail links interactive */
.link-item.thumbnail-link {
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.link-item.thumbnail-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.link-item.thumbnail-link::after {
    content: '';
    display: none;
}

.link-item.thumbnail-link:hover::after {
    opacity: 0;
}

.inline-form-wrapper {
    margin: 1rem 0;
    padding: 1rem;
    background-color: var(--secondary);
    border-radius: 8px;
    border-left: 4px solid var(--highlight);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Thumbnail links in editor */
.link-item.thumbnail-link {
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.link-item.thumbnail-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.thumbnail-link-content {
    display: grid;
    grid-template-columns: 120px 1fr;
}

.thumbnail-image, .placeholder-thumbnail {
    width: 100%;
    height: 100%;
    min-height: 90px;
    object-fit: cover;
}

.thumbnail-link-info {
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.thumbnail-link-title {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.thumbnail-link-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.3rem;
}

.thumbnail-link-url {
    font-size: 0.8rem;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
}

#url-form #url {
    background-color: #252525;
    border: 1px solid #444;
    color: var(--text);
}

#url-form #url:focus {
    background-color: #303030;
    border-color: var(--highlight);
}

.table td .text-truncate.d-inline-block {
    vertical-align: middle;
    display: inline-flex !important;
    align-items: center;
}

.preview-thumbnail-title {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.preview-thumbnail-description {
    font-size: 0.9rem;
    color: #666;
}

.placeholder-thumbnail i,
.preview-thumbnail-placeholder i {
    font-size: 2rem;
    opacity: 0.5;
}

.preview-thumbnail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    color: #666;
}

/* Saving indicator */
.saving-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--secondary);
    color: var(--text);
    padding: 10px 15px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.saving-indicator.success {
    background-color: #2ecc71;
    color: white;
}

.saving-indicator.error {
    background-color: #e74c3c;
    color: white;
}

.saving-indicator i {
    font-size: 16px;
}

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

.edit-btn {
    background-color: var(--highlight) !important;
    color: var(--primary) !important;
    transition: opacity 0.2s ease;
}

.edit-btn:hover {
    opacity: 0.9;
    background-color: var(--highlight) !important;
}

/* Fix to prevent edit buttons from showing in preview section */
.preview-section .edit-btn,
.preview-section .link-actions,
.preview-section .drag-handle {
    display: none !important;
}

/* Fix buttons appearing at edge of screen */
.btn.icon-btn.edit-btn[style*="position: fixed"],
.btn.icon-btn.edit-btn[style*="position:fixed"],
body > .btn.icon-btn.edit-btn,
body > .link-actions,
body > .drag-handle {
    display: none !important;
}

/* Profile Settings Section */
.profile-settings-section {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-settings-section h2 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.profile-settings-section p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.profile-image-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.profile-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.5rem;
}

.url-settings {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.url-settings h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary);
}

.url-input-group {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.url-prefix {
    background-color: var(--accent);
    padding: 0.5rem;
    border-radius: 4px 0 0 4px;
    color: var(--text);
    font-family: monospace;
}

.url-input-group input {
    border-radius: 0 4px 4px 0;
    border-left: none;
}

.url-note, .url-limit-warning {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.url-limit-warning {
    color: var(--danger);
}

.url-note {
    color: var(--text-muted);
}

/* Update theme preview function for color picker */
#theme_color {
    width: 100%;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.color-picker-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-picker-container input[type="color"] {
    flex: 1;
}

.color-picker-container .btn.small {
    padding: 6px 12px;
    font-size: 0.9rem;
    height: 40px;
}

/* Preview Link Hover Effects */
.preview-section a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.preview-section button:hover {
    background-color: #00d4a0 !important;
}

.preview-section a[target="_blank"] {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.preview-section .social-icon:hover {
    background-color: rgba(255,255,255,0.3);
}

/* Notification popup */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background-color: var(--secondary);
    color: var(--text);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    min-width: 250px;
    max-width: 350px;
    animation: slide-in 0.3s ease-out forwards;
}

.notification.success {
    border-left: 4px solid #4CAF50;
}

.notification.error {
    border-left: 4px solid #f44336;
}

.notification i {
    margin-right: 12px;
    font-size: 1.2rem;
}

.notification.success i {
    color: #4CAF50;
}

.notification.error i {
    color: #f44336;
}

.notification span {
    flex: 1;
}

.notification .close-btn {
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    margin-left: 8px;
    padding: 0;
}

.notification .close-btn:hover {
    opacity: 1;
}

.notification.fade-out {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
}

@keyframes slide-in {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Info text */
.info-text {
    background-color: rgba(0, 149, 255, 0.1);
    border-left: 3px solid #0095ff;
    padding: 10px 15px;
    margin: 15px 0;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #0070cc;
    display: flex;
    align-items: center;
}

.info-text i {
    margin-right: 8px;
    font-size: 1.1rem;
}

/* Input help text */
.input-help-text {
    font-size: 0.85rem;
    color: #777;
    margin-top: 5px;
    margin-bottom: 0;
    font-style: italic;
}

/* Inline Edit Forms */
.inline-edit-form {
    margin-top: 10px;
    padding: 15px;
    background-color: #2a2a2a;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    width: 100%;
    display: block;
    clear: both;
}

.inline-edit-form.hidden {
    display: none;
}

.inline-edit-form form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.inline-edit-form .form-group {
    margin-bottom: 0;
}

.platform-display {
    padding: 8px 12px;
    background-color: #252525;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.display-type-label {
    padding: 6px 12px;
    background-color: #252525;
    border-radius: 4px;
    font-size: 0.9rem;
}

.current-thumbnail {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
}

.current-thumbnail span {
    font-size: 0.85rem;
    color: #aaa;
}

/* Social icon button states */
.social-icon-btn {
    position: relative;
}

.social-icon-btn.has-link::after {
    content: '';
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 14px;
    height: 14px;
    background-color: #00C896;
    border-radius: 50%;
    border: 2px solid #151515;
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-item .inline-edit-form {
    flex-basis: 100%;
    order: 999; /* Ensure it appears at the bottom */
    margin-top: 10px;
    position: relative;
    z-index: 5;
}

/* Sponsor box for DIMA Tools */
.dima-sponsor-container {
    max-width: 800px;
    margin: 1rem auto;
    display: flex;
    flex-direction: column;
}

.dima-sponsor-box {
    border-radius: 8px;
    overflow: hidden;
    background-color: #f8f8f8;
    border: 1px solid #eee;
    width: 100%;
    padding: 0.75rem;
}

.dima-sponsor-link {
    display: flex;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease-in-out;
}

.dima-sponsor-link:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.dima-sponsor-content {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    width: 100%;
}

.dima-sponsor-content i {
    font-size: 1.2rem;
    color: var(--user-theme-color);
    margin-right: 1rem;
    flex-shrink: 0;
}

.dima-sponsor-text {
    display: flex;
    flex-direction: column;
}

.dima-sponsor-text span {
    font-size: 0.9rem;
    color: #666;
}

.dima-sponsor-text strong {
    font-size: 1rem;
    color: #333;
}

@media (max-width: 768px) {
    .dima-sponsor-box {
        padding: 0.5rem;
    }
    
    .dima-sponsor-content {
        padding: 0.25rem;
    }
}

/* Social Share Section */
.social-share-container {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #f0f0f0;
    border-radius: 10px;
    text-align: center;
}

.social-share-container h3 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.2rem;
}

.social-share-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: white;
    border: none;
    border-radius: 50%;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.social-share-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.social-share-icon i {
    font-size: 1.1rem;
}

.copy-link {
    background-color: white;
    color: #555;
}

.copy-link:hover {
    background-color: var(--highlight);
    color: white;
}

.kakao-share {
    background-color: #FEE500;
    color: #000;
}

.kakao-share:hover {
    background-color: #F6D433;
}

@media (max-width: 768px) {
    .social-share-links {
        justify-content: center;
    }
} 