 * { gin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-main: #f3f4f6;
    --card-bg: #ffffff;
    --text: #1f2937;
    --text-muted: #6b7280;
    --primary: #2563eb;
    --border: #e5e7eb;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-main);
    color: var(--text);
    line-height: 1.6;
    background-image: radial-gradient(#d1d5db 1px, transparent 1px);
    background-size: 24px 24px;
}

.mc-0 { color: #000000; } 
.mc-1 { color: #0000AA; } 
.mc-2 { color: #008000; font-weight: 600; }
.mc-3 { color: #008888; } 
.mc-4 { color: #CC0000; } 
.mc-5 { color: #880088; }
.mc-6 { color: #D69D00; } 
.mc-7 { color: #666666; } 
.mc-8 { color: #444444; }
.mc-9 { color: #4444FF; } 
.mc-a { color: #44BB44; }
.mc-b { color: #00AAAA; } 
.mc-c { color: #FF4444; text-shadow: 0.5px 0 0 #bd2c2c; } 
.mc-d { color: #FF55FF; } 
.mc-e { color: #d4d400; font-weight: 700; }
.mc-f { color: #000000; font-weight: 600; }

header {
    text-align: center;
    padding: 40px 20px 30px;
    background: linear-gradient(to bottom, #fff, var(--bg-main));
    border-bottom: 1px solid var(--border);
}

.logo-img {
    max-height: 100px;
    margin-bottom: 15px;
    filter: drop-shadow(0 8px 12px rgba(0,0,0,0.1));
    transition: transform 0.3s;
}

.logo-img:hover { transform: scale(1.05) rotate(2deg); }
.hero-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 5px;
    color: #111;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.server-ip-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    padding: 12px 28px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    user-select: none;
    gap: 12px;
}

.server-ip-container:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 10px 15px rgba(37, 99, 235, 0.15);
}

.server-ip-container:active {
    transform: scale(0.98);
}

.server-ip-container.copied {
    border-color: var(--success);
    background: #f0fdf4;
}

.ip-text {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    color: #374151;
}

.ip-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: transform 0.2s;
}

.server-ip-container.copied .ip-icon-wrapper {
    color: var(--success);
    transform: scale(1.1);
}

.copy-tooltip {
    position: absolute;
    top: -45px;
    background: #1f2937;
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.copy-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}

.server-ip-container:hover .copy-tooltip {
    opacity: 1;
    transform: translateY(0);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

@media (min-width: 1024px) {
    .bento-grid { grid-template-columns: repeat(4, 1fr); }
}

.rank-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 25px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    min-height: 300px;
}

.rank-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 30px -5px rgba(0, 0, 0, 0.08);
    border-color: var(--card-color);
}

.rank-card.small { grid-column: span 1; }

.rank-card.medium { grid-column: span 1; }

@media (min-width: 768px) { .rank-card.medium { grid-column: span 2; } }

.rank-card.large { grid-column: span 1; }

@media (min-width: 1024px) { 
    .rank-card.large { grid-column: span 2; grid-row: span 2; padding: 40px; } 
    .rank-card.large .rank-name { font-size: 3.5rem; }
    .rank-card.large .rank-price { font-size: 2.8rem; }
}

.rank-badge {
    position: absolute;
    top: -20px; right: -20px;
    width: 100px; height: 100px;
    background: var(--card-color);
    border-radius: 50%;
    opacity: 0.08;
    transition: 0.4s;
}

.rank-card:hover .rank-badge { transform: scale(1.4); opacity: 0.12; }

.rank-name {
    font-size: 2rem;
    font-weight: 800;
    color: var(--card-color);
    text-transform: uppercase;
    margin-bottom: 5px;
    line-height: 1;
}

.rank-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 20px;
}

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    font-size: 1rem;
}

.btn-buy {
    background: var(--card-color);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-buy:hover { filter: brightness(0.95); transform: translateY(-2px); }

.btn-details {
    background: #f3f4f6;
    color: #333;
    border: 1px solid var(--border);
}

.btn-details:hover { background: #e5e7eb; }

.footer-contacts {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    padding: 8px 16px;
    border-radius: 50px;
    background: rgba(0,0,0,0.03);
}

.contact-link:hover {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.contact-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

footer {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    background: #fff;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-link {
    position: relative;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding-bottom: 5px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.footer-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: translateX(-50%);
    opacity: 0;
}

.footer-link:hover {
    color: var(--primary);
    transform: translateY(-2px);
    text-shadow: 0 4px 8px rgba(37, 99, 235, 0.15);
}

.footer-link:hover::after {
    width: 100%;
    opacity: 1;
}

.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal.open { display: flex; opacity: 1; }
.modal-content {
    background: #ffffff;
    border-radius: 24px;
    padding: 30px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal.open .modal-content { transform: scale(1); }
.close-btn {
    position: absolute;
    top: 20px; right: 20px;
    background: #f3f4f6;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: #666;
    transition: 0.2s;
}

.close-btn:hover { background: #e5e7eb; color: #000; }

#detail-body { 
    background: #f9fafb; 
    padding: 20px; 
    border-radius: 16px; 
    border: 1px solid #e5e7eb;
    margin-bottom: 25px;
}

.desc-line { font-family: 'Consolas', monospace; font-size: 0.95rem; margin-bottom: 6px; }
.modal-action-btn {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    font-weight: 800;
    color: white;
    transition: 0.2s;
    text-transform: uppercase;
}

.modal-action-btn:hover { filter: brightness(0.9); transform: scale(1.01); }

.form-label { display: block; margin-bottom: 8px; font-weight: 600; color: #374151; margin-top: 15px; }
.form-input {
    width: 100%; padding: 14px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    font-size: 1rem;
    color: #000;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus { border-color: var(--primary); }
.payment-methods { 
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; 
    gap: 12px; 
    margin-top: 10px; 
    margin-bottom: 25px; 
}

.pay-method {
    padding: 15px 10px; 
    text-align: center;
    border: 2px solid #e5e7eb; 
    border-radius: 12px;
    cursor: pointer; 
    font-weight: 600; 
    color: #6b7280;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pay-method:hover { 
    background: #f9fafb; 
    border-color: #d1d5db; 
    transform: translateY(-2px);
}

.pay-method.selected {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
}

.pay-icon-svg {
    width: 28px;
    height: 28px;
    stroke: currentColor;
    stroke-width: 1.5;
    transition: 0.2s;
}

.pay-method.selected .pay-icon-svg {
    stroke-width: 2;
}

.pay-icon-img {
    height: 28px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.7); 
    transition: 0.2s;
}

.pay-method.selected .pay-icon-img,
.pay-method:hover .pay-icon-img {
    filter: grayscale(0%) opacity(1);
}

#doc-body h3 { margin-top: 20px; margin-bottom: 10px; color: #111; }
#doc-body p { margin-bottom: 10px; color: #4b5563; }
#doc-body ul { margin-left: 20px; margin-bottom: 15px; color: #4b5563; }
#doc-body strong { color: #000; }