/* Keepers of X - Vintage Manuscript Styling */

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

body {
    font-family: 'EB Garamond', serif;
    background: #2b2520;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(139, 90, 43, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 90, 43, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.parchment {
    background: 
        linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, transparent 10%, transparent 90%, rgba(0,0,0,0.1) 100%),
        linear-gradient(135deg, #f4e8d0 0%, #e8dcc0 50%, #f4e8d0 100%);
    border: 15px solid #8b5a2b;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 
        0 0 0 3px #5c3d1f,
        0 20px 60px rgba(0,0,0,0.5),
        inset 0 0 100px rgba(139, 90, 43, 0.1);
    position: relative;
    margin-bottom: 30px;
}

/* Ornate corners */
.ornate-corner {
    position: absolute;
    width: 80px;
    height: 80px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M0,100 Q20,80 40,70 Q50,65 60,50 Q70,35 80,20 Q90,5 100,0 L100,15 Q85,25 75,40 Q65,55 55,70 Q45,85 25,95 L0,100" fill="%238b5a2b" opacity="0.6"/><path d="M0,100 Q15,90 25,75 Q35,60 40,45 Q45,30 50,15 Q55,5 60,0 L65,10 Q60,20 55,35 Q50,50 45,65 Q40,80 30,90 L0,100" fill="%235c3d1f" opacity="0.4"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
}

.corner-tl { top: -5px; left: -5px; }
.corner-tr { top: -5px; right: -5px; transform: rotate(90deg); }
.corner-bl { bottom: -5px; left: -5px; transform: rotate(-90deg); }
.corner-br { bottom: -5px; right: -5px; transform: rotate(180deg); }

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #8b5a2b;
}

.logo-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

h1 {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    font-weight: 700;
    color: #3d2817;
    text-shadow: 2px 2px 0px rgba(139, 90, 43, 0.2);
    letter-spacing: 2px;
}

.subtitle {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: #5c3d1f;
    font-weight: 400;
}

.tagline {
    font-size: 1.1rem;
    color: #6b4423;
    font-style: italic;
}

.submit-section {
    background: rgba(232, 220, 192, 0.6);
    border: 3px solid #8b5a2b;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: inset 0 2px 10px rgba(139, 90, 43, 0.2);
}

.submit-label {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: #3d2817;
    margin-bottom: 12px;
    display: block;
    font-weight: 600;
}

.submit-form {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.submit-input {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid #8b5a2b;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    font-family: 'EB Garamond', serif;
    font-size: 1.1rem;
    color: #3d2817;
    transition: all 0.3s;
}

.submit-input:focus {
    outline: none;
    border-color: #5c3d1f;
    background: rgba(255, 255, 255, 1);
}

.submit-btn {
    padding: 12px 35px;
    background: #8b5a2b;
    color: #f4e8d0;
    border: 2px solid #5c3d1f;
    border-radius: 4px;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover:not(:disabled) {
    background: #5c3d1f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.submit-hint {
    color: #6b4423;
    font-size: 0.95rem;
    font-style: italic;
}

.submit-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    font-size: 0.95rem;
    display: none;
}

.submit-message.success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4caf50;
    color: #2e7d32;
    display: block;
}

.submit-message.error {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid #f44336;
    color: #c62828;
    display: block;
}

.filters-section {
    text-align: center;
    margin-bottom: 30px;
}

.filters-label {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: #3d2817;
    margin-bottom: 15px;
    display: inline-block;
    margin-right: 15px;
    font-weight: 600;
}

.filters {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 10px 20px;
    background: rgba(139, 90, 43, 0.3);
    border: 2px solid #8b5a2b;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #3d2817;
}

.filter-btn:hover, .filter-btn.active {
    background: #8b5a2b;
    color: #f4e8d0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.stats-bar {
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(232, 220, 192, 0.4);
    border: 2px solid #8b5a2b;
    border-radius: 4px;
}

.stat {
    flex: 1;
}

.stat-number {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #8b5a2b;
}

.stat-label {
    color: #5c3d1f;
    font-size: 0.95rem;
    margin-top: 5px;
    font-style: italic;
}

.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.profile-card {
    background: rgba(232, 220, 192, 0.7);
    border: 3px solid #8b5a2b;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 
        0 5px 15px rgba(0,0,0,0.2),
        inset 0 1px 0 rgba(255,255,255,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 10px 25px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #8b5a2b;
}

.profile-seal {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 4px solid #8b5a2b;
    padding: 3px;
    background: radial-gradient(circle, #f4e8d0 0%, #d4b896 100%);
    box-shadow: 
        0 4px 10px rgba(0,0,0,0.3),
        inset 0 2px 5px rgba(139, 90, 43, 0.3);
    position: relative;
    flex-shrink: 0;
}

.profile-pic {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #5c3d1f;
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-handle {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #3d2817;
    margin-bottom: 5px;
    word-break: break-word;
}

.profile-title {
    color: #8b5a2b;
    font-size: 0.95rem;
    font-style: italic;
}

.profile-details {
    margin-top: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1rem;
}

.detail-label {
    color: #6b4423;
    font-weight: 600;
}

.detail-value {
    font-weight: 600;
    color: #3d2817;
}

.join-date-box {
    background: rgba(139, 90, 43, 0.2);
    border: 2px solid #8b5a2b;
    padding: 10px 15px;
    border-radius: 4px;
    margin-top: 12px;
    font-size: 0.95rem;
    color: #3d2817;
}

.join-label {
    font-weight: 600;
    color: #5c3d1f;
}

.og-badge {
    display: inline-block;
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 50%, #d4af37 100%);
    color: #3d2817;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 8px;
    border: 1px solid #a68629;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.location {
    color: #8b5a2b;
    font-weight: 600;
}

.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: #5c3d1f;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(139, 90, 43, 0.3);
    border-top-color: #8b5a2b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #5c3d1f;
    font-size: 1.2rem;
    font-style: italic;
}

.empty-state p {
    margin-bottom: 10px;
}

.footer {
    text-align: center;
    color: #d4b896;
    padding: 30px 20px;
    font-size: 0.9rem;
}

.footer p {
    margin-bottom: 8px;
}

.footer a {
    color: #f4e8d0;
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: #8b5a2b;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }
    
    .profiles-grid {
        grid-template-columns: 1fr;
    }

    .submit-form {
        flex-direction: column;
    }

    .stats-bar {
        flex-direction: column;
        gap: 15px;
    }

    .filters {
        display: flex;
    }

    .filters-label {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }

    .logo-header {
        flex-direction: column;
        gap: 10px;
    }

    .parchment {
        padding: 20px;
    }
}