* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.bookmarks-container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 30px;
    backdrop-filter: blur(10px);
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    color: #667eea;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

.add-bookmark-section {
    background: #f9f9f9;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.add-bookmark-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.bookmark-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #555;
    font-size: 0.9em;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-add {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    height: fit-content;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.bookmarks-section {
    margin-top: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    color: #667eea;
    font-size: 1.5em;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    background: white;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.bookmarks-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.bookmark-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    border-left: 4px solid #667eea;
    position: relative;
}

.bookmark-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.bookmark-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.bookmark-icon {
    font-size: 2em;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    color: white;
}

.bookmark-info {
    flex: 1;
}

.bookmark-name {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.bookmark-category {
    font-size: 0.85em;
    color: #888;
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-block;
}

.bookmark-url {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
    word-break: break-all;
}

.bookmark-actions {
    display: flex;
    gap: 10px;
}

.btn-action {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-open {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-open:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.btn-edit {
    background: #f0f0f0;
    color: #666;
}

.btn-edit:hover {
    background: #e0e0e0;
}

.btn-delete {
    background: #fee;
    color: #c33;
}

.btn-delete:hover {
    background: #fcc;
}

.empty-message {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-message p {
    font-size: 1.1em;
    margin-bottom: 10px;
}

.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* 모달 스타일 */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2em;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #333;
}

.modal-content h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-save {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-cancel {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    color: #666;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cancel:hover {
    background: #f0f0f0;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .bookmarks-container {
        padding: 20px;
    }

    header h1 {
        font-size: 2em;
    }

    .bookmark-form {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .bookmarks-list {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .bookmarks-container {
        padding: 15px;
    }

    header h1 {
        font-size: 1.5em;
    }
}
