:root {
    --primary-color: #10b981;
    --primary-hover: #059669;
    --bg-dark: #121212;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f3f4f6;
    --text-dim: #9ca3af;
    --accent-glow: 0 0 20px rgba(16, 185, 129, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Pretendard', sans-serif;
    color: var(--text-main);
    background: var(--bg-dark);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at top right, #1e3a8a 0%, #121212 50%);
    overflow-x: hidden;
}

.glass-container {
    width: 90%;
    max-width: 800px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    margin: 40px 0;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.logo-icon {
    font-size: 2.5rem;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(to right, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-dim);
    font-size: 0.95rem;
}

/* Search Box */
.search-section {
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 6px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: var(--accent-glow);
}

#addressInput {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 12px 16px;
    font-size: 1rem;
    outline: none;
    cursor: pointer;
}

#searchBtn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

#searchBtn:hover {
    background: var(--primary-hover);
}

/* Result Section */
.result-section.hidden {
    display: none;
}

.result-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    margin-top: 20px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.btn-copy-all {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid #3b82f6;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy-all:hover {
    background: #3b82f6;
    color: white;
}

.data-item {
    margin-bottom: 16px;
}

.data-item label {
    display: block;
    color: var(--text-dim);
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.value-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 14px;
    border-radius: 8px;
}

.highlight {
    color: var(--primary-color);
    font-weight: 700;
}

.btn-mini-copy {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-dim);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-mini-copy:hover {
    color: white;
    border-color: white;
}

/* Amazon Format */
.amazon-format {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px dashed var(--glass-border);
}

.amazon-format h4 {
    color: #f59e0b;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.format-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.grid-item span {
    display: block;
    font-size: 0.9rem;
    color: var(--text-main);
}

/* Detail Builder */
.detail-builder {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.detail-builder h4 {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 12px;
}

.detail-input-group input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
}

.detail-input-group input:focus {
    border-color: var(--primary-color);
}

.detail-hint {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 8px;
}

/* PCC Section */
.pcc-section {
    margin-top: 30px;
    padding: 24px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.pcc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.pcc-header h3 {
    font-size: 1rem;
    color: var(--primary-color);
}

.secure-icon {
    font-size: 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 4px;
}

.pcc-box {
    display: flex;
    gap: 10px;
}

.pcc-box input {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    outline: none;
}

.pcc-actions button {
    height: 100%;
    padding: 0 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

#savePcc {
    background: var(--primary-color);
    color: white;
    border: none;
}

#copyPcc {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid #3b82f6;
}

#copyPcc.hidden {
    display: none;
}

.pcc-note {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 10px;
}

/* History */
.history-section {
    margin-top: 40px;
}

.history-section h3 {
    font-size: 1rem;
    color: var(--text-dim);
    margin-bottom: 12px;
}

#historyList {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.history-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.2s;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}

/* Responsive */
@media (max-width: 600px) {
    .format-grid {
        grid-template-columns: 1fr;
    }

    .glass-container {
        padding: 24px;
        margin: 20px 0;
    }
}