:root {
    --primary-color: #10b981;
    --primary-hover: #059669;
    --bg-dark: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --accent-glow: 0 0 20px rgba(16, 185, 129, 0.2);
    --font-size-base: 18px;
    /* Increased for better readability */
}

* {
    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;
    font-size: var(--font-size-base);
}

.glass-container {
    width: 95%;
    max-width: 850px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 50px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    margin: 40px 0;
}

header {
    text-align: center;
    margin-bottom: 50px;
}

.usage-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
    padding: 25px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
}

.step span {
    background: var(--primary-color);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.9rem;
    color: white;
}

.arrow {
    color: var(--text-dim);
    font-size: 1.2rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 12px;
}

.logo-icon {
    font-size: 3rem;
}

h1 {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(to right, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-dim);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Search Box */
.search-section {
    margin-bottom: 40px;
}

.search-box {
    display: flex;
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    padding: 10px;
    border: 2px 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: 20px 25px;
    font-size: 1.3rem;
    outline: none;
    cursor: pointer;
    font-weight: 500;
}

#searchBtn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 45px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

#searchBtn:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
}

/* Result Section */
.result-section.hidden {
    display: none;
}

.result-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    margin-top: 30px;
    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: 25px;
}

.result-header h3 {
    font-size: 1.3rem;
    font-weight: 800;
}

.btn-copy-all {
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.btn-copy-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.4);
}

.data-item {
    margin-bottom: 20px;
}

.data-item label {
    display: block;
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.value-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.value-container span {
    font-size: 1.1rem;
    font-weight: 600;
    word-break: break-all;
    padding-right: 15px;
}

.highlight {
    color: var(--primary-color);
    font-weight: 800;
}

.btn-mini-copy {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-mini-copy:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Amazon Format */
.amazon-format {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px dashed var(--glass-border);
}

.amazon-format h4 {
    color: #f59e0b;
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.format-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 15px;
    border-radius: 12px;
}

.grid-item label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 5px;
}

.grid-item span {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Detail Builder */
.detail-builder {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
}

.detail-builder h4 {
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 800;
    margin-bottom: 15px;
}

.detail-input-group input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--glass-border);
    color: white;
    padding: 15px 20px;
    font-size: 1.1rem;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s;
}

.detail-input-group input:focus {
    border-color: var(--primary-color);
}

.detail-hint {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-top: 10px;
    font-weight: 500;
}

/* PCC Section */
.pcc-section {
    margin-top: 40px;
    padding: 30px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.pcc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pcc-header h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-color);
}

.secure-icon {
    font-size: 0.85rem;
    background: rgba(16, 185, 129, 0.15);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 700;
}

.pcc-box {
    display: flex;
    gap: 15px;
}

.pcc-box input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--glass-border);
    color: white;
    padding: 15px 20px;
    font-size: 1.1rem;
    border-radius: 12px;
    outline: none;
}

.pcc-actions button {
    padding: 0 30px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    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.85rem;
    color: var(--text-dim);
    margin-top: 12px;
}

/* History */
.history-section {
    margin-top: 50px;
}

.history-section h3 {
    font-size: 1.1rem;
    color: var(--text-dim);
    margin-bottom: 15px;
    font-weight: 700;
}

#historyList {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.history-item {
    background: rgba(255, 255, 255, 0.08);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid var(--glass-border);
}

.history-item:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Monetization Sections */
.monetization-container {
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.ad-slot {
    background: rgba(0, 0, 0, 0.2);
    border: 2px dashed var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    color: var(--text-dim);
    font-size: 1.1rem;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.affiliate-section {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 24px;
    padding: 35px;
}

.affiliate-section h3 {
    font-size: 1.4rem;
    margin-bottom: 25px;
    color: #60a5fa;
    display: flex;
    align-items: center;
    gap: 12px;
}

.affiliate-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.aff-item {
    background: rgba(255, 255, 255, 0.06);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    text-decoration: none;
    color: white;
    font-size: 1.1rem;
    font-weight: 800;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.aff-item:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent-blue);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.support-section {
    text-align: center;
    margin-top: 20px;
    padding: 35px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
}

.coffee-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #ffdd00;
    color: #000000 !important;
    padding: 18px 36px;
    border-radius: 60px;
    text-decoration: none;
    font-weight: 900;
    font-size: 1.15rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.coffee-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 15px 30px rgba(255, 221, 0, 0.25);
}

/* Footer */
footer {
    text-align: center;
    margin-top: 60px;
    color: var(--text-dim);
    font-size: 1rem;
    padding-bottom: 40px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 15px 35px;
    border-radius: 60px;
    font-size: 1.1rem;
    font-weight: 800;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-20px);
}

/* Responsive */
@media (max-width: 600px) {
    .glass-container {
        padding: 30px 20px;
        width: 98%;
        border-radius: 0;
        margin: 0;
    }

    .usage-steps {
        flex-direction: column;
        gap: 12px;
    }

    .arrow {
        transform: rotate(90deg);
        margin: 5px 0;
    }

    .search-box {
        flex-direction: column;
        padding: 12px;
        gap: 12px;
        border-radius: 16px;
    }

    #addressInput {
        padding: 15px;
        font-size: 1.1rem;
    }

    #searchBtn {
        width: 100%;
        height: 65px;
        padding: 0;
    }

    .format-grid {
        grid-template-columns: 1fr;
    }

    .pcc-box {
        flex-direction: column;
    }

    .pcc-actions button {
        height: 60px;
    }

    h1 {
        font-size: 2.2rem;
    }
}