/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, rgba(55, 183, 230, 0.05) 0%, rgba(250, 168, 32, 0.05) 50%, rgba(221, 62, 119, 0.05) 100%);
    color: #1a202c;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0 20px;
}

.avatar {
    width: 60px;
    height: 60px;
    background: rgba(55, 183, 230, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.avatar a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.avatar img {
    object-fit: contain;
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.avatar svg {
    color: rgba(55, 183, 230, 0.7);
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 8px;
}

.header p {
    font-size: 14px;
    color: #718096;
    font-weight: 400;
}

/* User Info */
.user-info {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(55, 183, 230, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(55, 183, 230, 0.2);
}

.user-info p {
    font-size: 13px;
    color: #4a5568;
    margin-bottom: 8px;
    font-weight: 500;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.staff {
    background: rgba(250, 168, 32, 0.2);
    color: #FAA820;
    border: 1px solid #FAA820;
}

.badge.superuser {
    background: rgba(221, 62, 119, 0.2);
    color: #DD3E77;
    border: 1px solid #DD3E77;
}

/* Links */
.links {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
    justify-content: center;
    align-items: center;
}

/* Single link centering */
.links:has(.link:only-child) {
    justify-content: center;
    align-items: center;
}

.links:has(.link:only-child) .link {
    max-width: 300px;
    width: 100%;
}

.link {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border: 1px solid rgba(55, 183, 230, 0.2);
    border-radius: 12px;
    text-decoration: none;
    color: #1a202c;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(55, 183, 230, 0.1);
}

.link:hover {
    border-color: #37B7E6;
    box-shadow: 0 4px 12px rgba(55, 183, 230, 0.2);
    transform: translateY(-1px);
}

.link:active {
    transform: translateY(0);
}

.link svg {
    color: #37B7E6;
    margin-right: 12px;
    flex-shrink: 0;
}

.link span {
    flex: 1;
}

/* External Link */
.link.external {
    background: rgba(250, 168, 32, 0.1);
    border-color: #FAA820;
}

.link.external:hover {
    border-color: #FAA820;
    background: rgba(250, 168, 32, 0.15);
}

.link.external svg {
    color: #FAA820;
}

/* No Access Message */
.no-access {
    text-align: center;
    padding: 40px 20px;
    background: rgba(0, 149, 110, 0.1);
    border: 1px solid rgba(0, 149, 110, 0.3);
    border-radius: 12px;
    color: #00956E;
}

.no-access svg {
    color: #00956E;
    margin-bottom: 16px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.no-access p {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px 0;
}

.footer p {
    font-size: 12px;
    color: #37B7E6;
}

/* Desktop Grid Layout */
@media (min-width: 768px) {
    .container {
        max-width: 900px;
        padding: 40px;
    }

    .header {
        margin-bottom: 60px;
        padding: 60px 0 30px;
    }

    .avatar {
        width: 80px;
        height: 80px;
        margin-bottom: 20px;
    }

    .avatar svg {
        width: 32px;
        height: 32px;
    }

    .header h1 {
        font-size: 32px;
        margin-bottom: 12px;
    }

    .header p {
        font-size: 16px;
    }

    .user-info {
        margin-top: 20px;
        padding: 16px 20px;
    }

    .user-info p {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .badge {
        padding: 6px 12px;
        font-size: 12px;
    }

    .links {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        margin-bottom: 60px;
        justify-content: center;
        align-items: center;
    }

    /* Single link centering for desktop */
    .links:has(.link:only-child) {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .link {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
        font-size: 14px;
        min-height: 120px;
        justify-content: center;
    }

    .link svg {
        margin-right: 0;
        margin-bottom: 12px;
        width: 24px;
        height: 24px;
    }

    .link span {
        flex: none;
    }

    .no-access {
        grid-column: 1 / -1;
        padding: 60px 40px;
    }

    .no-access svg {
        width: 48px;
        height: 48px;
        margin-bottom: 20px;
    }

    .no-access p {
        font-size: 16px;
    }
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .container {
        padding: 16px;
    }

    .header {
        padding: 30px 0 20px;
    }

    .avatar {
        width: 50px;
        height: 50px;
    }

    .avatar svg {
        width: 20px;
        height: 20px;
    }

    .header h1 {
        font-size: 20px;
    }

    .header p {
        font-size: 13px;
    }

    .user-info {
        margin-top: 12px;
        padding: 10px 12px;
    }

    .user-info p {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .badge {
        padding: 3px 6px;
        font-size: 10px;
    }

    .link {
        padding: 14px 16px;
        font-size: 14px;
    }

    .link svg {
        width: 14px;
        height: 14px;
        margin-right: 10px;
    }

    .no-access {
        padding: 30px 16px;
    }

    .no-access svg {
        width: 24px;
        height: 24px;
        margin-bottom: 12px;
    }

    .no-access p {
        font-size: 13px;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a202c;
        color: #f7fafc;
    }

    .header h1 {
        color: #f7fafc;
    }

    .header p {
        color: #a0aec0;
    }

    .user-info {
        background: rgba(55, 183, 230, 0.2);
        border-color: rgba(55, 183, 230, 0.3);
    }

    .user-info p {
        color: #e2e8f0;
    }

    .badge.staff {
        background: rgba(250, 168, 32, 0.3);
        color: #FAA820;
        border-color: #FAA820;
    }

    .badge.superuser {
        background: rgba(221, 62, 119, 0.3);
        color: #DD3E77;
        border-color: #DD3E77;
    }

    .link {
        background: #2d3748;
        border-color: rgba(55, 183, 230, 0.3);
        color: #f7fafc;
    }

    .link:hover {
        border-color: #37B7E6;
        background: #2d3748;
    }

    .link.external {
        background: rgba(250, 168, 32, 0.2);
        border-color: #FAA820;
    }

    .link.external:hover {
        border-color: #FAA820;
        background: rgba(250, 168, 32, 0.3);
    }

    .link.external svg {
        color: #FAA820;
    }

    .no-access {
        background: rgba(0, 149, 110, 0.2);
        border-color: rgba(0, 149, 110, 0.4);
        color: #00956E;
    }

    .no-access svg {
        color: #00956E;
    }

    .footer p {
        color: #37B7E6;
    }
}

/* Focus States */
.link:focus {
    outline: 2px solid #37B7E6;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .container {
        max-width: none;
        padding: 0;
    }

    .link {
        border: 1px solid #e2e8f0;
        box-shadow: none;
    }

    .footer {
        display: none;
    }
}
