@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-dark: #060913;
    --bg-card: rgba(11, 19, 38, 0.7);
    --border-color: rgba(0, 160, 227, 0.15);
    --border-hover: rgba(0, 160, 227, 0.4);
    --primary-cyan: #00a0e3;
    --primary-blue: #0066cc;
    --neon-glow: 0 0 15px rgba(0, 160, 227, 0.45);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --error: #ef4444;
    --success: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 102, 204, 0.15) 0%, transparent 45%),
        radial-gradient(circle at 90% 80%, rgba(0, 160, 227, 0.1) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header & Navigation */
header {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--primary-cyan) 0%, #ffffff 60%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 160, 227, 0.2);
}

.logo-text span {
    background: linear-gradient(135deg, #ffffff 0%, #b0b5c0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav {
    display: flex;
    gap: 0.75rem;
    background: rgba(11, 19, 38, 0.5);
    border: 1px solid var(--border-color);
    padding: 0.4rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.nav-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

.nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-cyan) 0%, var(--primary-blue) 100%);
    box-shadow: var(--neon-glow);
}

/* Main Layout */
main {
    flex: 1;
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.2rem;
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 10px 40px rgba(0, 160, 227, 0.15);
}

/* Typography & Forms */
h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sub-title {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
}

.form-input {
    width: 100%;
    background: rgba(6, 9, 19, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.9rem 1rem 0.9rem 2.8rem;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 10px rgba(0, 160, 227, 0.25);
}

/* Discord Guild Details Card */
.guild-card {
    background: rgba(6, 9, 19, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.2rem;
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.guild-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.guild-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #1a1e2e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-cyan);
    border: 1px solid var(--border-color);
    object-fit: cover;
}

.guild-info-meta {
    display: flex;
    flex-direction: column;
}

.guild-name {
    font-weight: 700;
    font-size: 1.15rem;
    color: #ffffff;
}

.guild-id {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.guild-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.stat-box {
    background: rgba(11, 19, 38, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 0.75rem;
    text-align: center;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
    font-weight: 600;
}

/* Buttons */
.btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-cyan) 0%, var(--primary-blue) 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 1rem;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--neon-glow);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(0, 160, 227, 0.6);
    filter: brightness(1.1);
}

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

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Stocks view styling */
.stock-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.stock-item {
    background: rgba(6, 9, 19, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s ease;
}

.stock-item:hover {
    transform: translateX(4px);
    border-color: var(--border-hover);
}

.stock-details {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stock-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(0, 160, 227, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-cyan);
    font-size: 1.2rem;
}

.stock-name {
    font-weight: 600;
    font-size: 1.05rem;
}

.stock-count {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.stock-count.out {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* FAQ / Help Styling */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: rgba(6, 9, 19, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.2rem;
}

.faq-question {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.faq-answer {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Key Check Result Styling */
.check-result {
    background: rgba(6, 9, 19, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.check-row {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.check-row:last-child {
    border-bottom: none;
}

.check-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.check-val {
    font-weight: 600;
    font-size: 0.9rem;
}

.status-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.unused {
    background: rgba(0, 160, 227, 0.15);
    color: var(--primary-cyan);
    border: 1px solid rgba(0, 160, 227, 0.3);
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge.completed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Alert Notification Panel */
.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.3s ease;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
}

/* Footer */
footer {
    width: 100%;
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    margin-top: auto;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hidden views class */
.view-panel {
    display: none;
}

.view-panel.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

/* Spinner Loader */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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