* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #f5f7fb;
    --card: rgba(255, 255, 255, 0.92);
    --text: #111827;
    --muted: #6b7280;
    --border: rgba(17, 24, 39, 0.08);
    --primary: #111111;
    --primary-hover: #000000;
    --green: #15803d;
    --danger: #c0392b;
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 28%),
        radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.08), transparent 24%),
        var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a {
    text-decoration: none;
}

.header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.78);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.nav {
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.brand {
    font-size: 24px;
    font-weight: 800;
    color: #111;
    letter-spacing: -0.4px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.nav-links a {
    color: #222;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 999px;
    transition: 0.25s ease;
}

.nav-links a:hover {
    background: rgba(17,17,17,0.06);
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 26px 20px 50px;
}

.top-actions {
    margin-bottom: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 13px 18px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 10px 22px rgba(17,17,17,0.12);
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6b7280;
}

.btn-secondary:hover {
    background: #4b5563;
}

.card,
.admin-card,
.info-box {
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    overflow: hidden;
}

.book-detail-grid {
    display: grid;
    grid-template-columns: 420px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    margin-bottom: 28px;
}

.book-image-card {
    padding: 18px;
}

.book-image-wrap {
    background: linear-gradient(180deg, #ffffff, #eef3f9);
    border-radius: 20px;
    padding: 14px;
    border: 1px solid rgba(0,0,0,0.05);
}

.book-image-wrap img {
    width: 100%;
    height: 540px;
    object-fit: cover;
    border-radius: 16px;
    display: block;
}

.book-info {
    padding: 30px;
}

.book-badge {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.06);
    color: #111827;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
}

.book-title {
    font-size: 38px;
    line-height: 1.2;
    margin-bottom: 14px;
    letter-spacing: -0.6px;
}

.book-author {
    font-size: 16px;
    color: var(--muted);
    margin-bottom: 18px;
}

.book-price {
    font-size: 34px;
    font-weight: 800;
    color: var(--green);
    margin-bottom: 18px;
}

.book-desc {
    font-size: 16px;
    line-height: 1.9;
    color: #374151;
}

.error-box {
    margin-bottom: 20px;
    padding: 16px 18px;
    border-radius: 18px;
    background: #fff5f5;
    border: 1px solid rgba(192, 57, 43, 0.15);
    color: var(--danger);
    font-weight: 700;
    box-shadow: var(--shadow);
}

.order-card {
    padding: 28px;
}

.section-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.4px;
}

.section-subtitle {
    color: var(--muted);
    font-size: 15px;
    margin-bottom: 22px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field.full {
    grid-column: 1 / -1;
}

.field label {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid rgba(17, 24, 39, 0.12);
    background: #fff;
    color: #111827;
    border-radius: 14px;
    padding: 14px 15px;
    font-size: 15px;
    outline: none;
    transition: 0.22s ease;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(17, 24, 39, 0.5);
    box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.06);
}

.shipping-note {
    margin-top: 6px;
    font-size: 13px;
    color: #b45309;
    background: #fff7ed;
    border: 1px solid rgba(180, 83, 9, 0.12);
    padding: 10px 12px;
    border-radius: 12px;
}

.summary-box {
    margin-top: 22px;
    padding: 20px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border: 1px solid rgba(17,24,39,0.08);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 10px;
    color: #374151;
    font-size: 15px;
}

.summary-row:last-child {
    margin-bottom: 0;
}

.summary-row.total {
    padding-top: 14px;
    margin-top: 14px;
    border-top: 1px dashed rgba(17,24,39,0.12);
    font-size: 20px;
    font-weight: 800;
    color: #111827;
}

.pay-btn-wrap {
    margin-top: 22px;
}

.pay-btn {
    width: 100%;
    min-height: 54px;
    font-size: 16px;
    border-radius: 16px;
}

.info-box {
    padding: 34px 24px;
    text-align: center;
}

.footer {
    max-width: 1180px;
    margin: 20px auto 40px;
    padding: 0 20px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.not-found-title {
    margin-bottom: 10px;
}

.not-found-text {
    color: #666;
}

.hidden-form {
    display: none;
}

@media (max-width: 992px) {
    .book-detail-grid {
        grid-template-columns: 1fr;
    }

    .book-image-wrap img {
        height: 420px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 18px 14px 34px;
    }

    .nav {
        padding: 14px;
    }

    .brand {
        font-size: 22px;
    }

    .book-info,
    .order-card {
        padding: 20px;
    }

    .book-title {
        font-size: 30px;
    }

    .book-price {
        font-size: 28px;
    }

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

    .book-image-wrap img {
        height: 340px;
    }

    .summary-row.total {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .nav-links {
        width: 100%;
    }

    .nav-links a {
        flex: 1;
        text-align: center;
    }

    .book-title {
        font-size: 26px;
    }

    .section-title {
        font-size: 24px;
    }

    .btn,
    .pay-btn {
        width: 100%;
    }
}