.mathinal {
    padding: clamp(16px, 4vw, 32px);
    max-width: 900px;
    margin: 20px auto;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1d29 100%);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.mathinal-header {
    margin-bottom: clamp(20px, 5vw, 32px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 16px;
}

.mathinal-header h1 {
    margin: 0;
    font-size: clamp(1.8rem, 5vw, 2.4rem);
    font-weight: 700;
    background: linear-gradient(135deg, #4f8cff, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mathinal-header .stats {
    margin-top: 0;
    color: #a8a8a8;
    font-size: clamp(0.85rem, 3vw, 0.95rem);
    font-weight: 500;
}

.editions-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 20px;
}

.edition {
    background: rgba(30, 35, 42, 0.4);
    padding: clamp(16px, 4vw, 24px);
    border-radius: 10px;
    border: 1px solid rgba(79, 140, 255, 0.08);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.edition:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    border-color: rgba(79, 140, 255, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

.edition h2 {
    margin: 0 0 8px 0;
    font-size: clamp(1.1rem, 4vw, 1.3rem);
    font-weight: 600;
}

.edition h2 a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.edition h2 a:hover {
    color: #4f8cff;
}

.edition .meta {
    margin: 0 0 12px 0;
    font-size: clamp(0.8rem, 2.5vw, 0.85rem);
    color: #9ca3af;
    font-weight: 400;
}

.preview {
    margin: 12px 0 16px 0;
    line-height: 1.6;
    color: #d1d5db;
    font-size: clamp(0.9rem, 3vw, 1rem);
}

.btn.small {
    font-size: clamp(0.8rem, 2.5vw, 0.85rem);
    padding: 8px 16px;
    background: linear-gradient(135deg, #4f8cff, #7c3aed);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
}

.btn.small:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(79, 140, 255, 0.3);
}

.empty {
    text-align: center;
    color: #9ca3af;
    font-size: clamp(1rem, 3vw, 1.1rem);
    padding: 40px 20px;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .mathinal {
        margin: 16px;
        border-radius: 16px;
    }

    .edition {
        padding: 20px;
    }

    .editions-list {
        gap: 16px;
    }
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 8px;
}

.header-top h1 {
    margin: 0;
    font-size: clamp(1.8rem, 5vw, 2.4rem);
    font-weight: 700;
    background: linear-gradient(135deg, #4f8cff, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-create {
    padding: 10px 20px;
    background: linear-gradient(135deg, #4f8cff, #7c3aed);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(79, 140, 255, 0.2);
    white-space: nowrap;
}

.btn-create:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 140, 255, 0.3);
}

.btn-create:active {
    transform: translateY(0);
}

/* Mobile responsive */
@media (max-width: 480px) {
    .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .btn-create {
        align-self: stretch;
        text-align: center;
        padding: 12px 20px;
    }
}