/* Pokemon Contest Voting - Baseline CSS */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 0.5em;
    color: #2c3e50;
}

h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

h2 {
    font-size: 2rem;
    color: #34495e;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

/* Layout Components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.main-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    color: rgba(255, 255, 255, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Navigation */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

.nav-brand a {
    text-decoration: none;
    color: #fff;
}

.nav-brand a:hover {
    color: #9cf;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-links span {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.btn-primary {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}

.btn-secondary:hover {
    box-shadow: 0 6px 20px rgba(149, 165, 166, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.btn-success:hover {
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
    font-size: 0.95rem;
    letter-spacing: 0.025em;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background-color: #fff;
    color: #2c3e50;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.form-input:hover,
.form-textarea:hover,
.form-select:hover {
    border-color: #cbd5e0;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 3rem;
    appearance: none;
}

/* Input variants */
.form-input-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.form-input-lg {
    padding: 1rem 1.25rem;
    font-size: 1.125rem;
}

/* Checkbox and Radio */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.form-check-input {
    width: auto;
    margin-right: 0.75rem;
    margin-top: 0;
}

.form-check-input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 4px;
}

.form-check-input[type="radio"] {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
}

.form-check-label {
    margin-bottom: 0;
    cursor: pointer;
    user-select: none;
}

/* Validation states */
.form-input.is-valid,
.form-textarea.is-valid,
.form-select.is-valid {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.15);
}

.form-input.is-invalid,
.form-textarea.is-invalid,
.form-select.is-invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

.form-feedback {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.form-feedback.valid-feedback {
    color: #27ae60;
}

.form-feedback.invalid-feedback {
    color: #e74c3c;
}

/* Input groups */
.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-input {
    border-radius: 0;
    margin-bottom: 0;
}

.input-group .form-input:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.input-group .form-input:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.input-group-prepend,
.input-group-append {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    background-color: #f8f9fa;
    border: 2px solid #e1e5e9;
    color: #6c757d;
    font-size: 1rem;
    white-space: nowrap;
}

.input-group-prepend {
    border-right: none;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.input-group-append {
    border-left: none;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Floating labels */
.form-floating {
    position: relative;
}

.form-floating .form-input,
.form-floating .form-textarea {
    padding: 1.625rem 1rem 0.625rem;
}

.form-floating label {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 1rem;
    overflow: hidden;
    text-align: start;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
    border: 2px solid transparent;
    transform-origin: 0 0;
    transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
}

.form-floating .form-input:focus ~ label,
.form-floating .form-input:not(:placeholder-shown) ~ label,
.form-floating .form-textarea:focus ~ label,
.form-floating .form-textarea:not(:placeholder-shown) ~ label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.card-title {
    margin: 0;
    font-size: 1.25rem;
    color: #2c3e50;
}

.card-body {
    color: #666;
}

/* Pokemon Contest Specific Styles */
.contest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.pokemon-card {
    background: linear-gradient(145deg, #fff, #f8f9fa);
    border: 3px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.pokemon-card::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7);
    border-radius: 15px;
    z-index: -1;
    animation: rainbow 3s linear infinite;
}

@keyframes rainbow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.pokemon-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.vote-button {
    width: 100%;
    margin-top: 1rem;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.vote-button:hover {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
}

/* Authentication Styles */
.auth-container {
    max-width: 400px;
    margin: 5rem auto;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.discord-login {
    background: #5865f2;
    color: white;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.discord-login:hover {
    background: #4752c4;
    color: white;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.flex { display: flex; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-column { flex-direction: column; }

.hidden { display: none; }
.visible { display: block; }

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .main-content {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
        text-align: center;
    }
    
    .contest-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    }
    
    .main-content {
        background: rgba(44, 62, 80, 0.95);
        color: #ecf0f1;
    }
    
    .card {
        background: #34495e;
        color: #ecf0f1;
        border-color: #4a6741;
    }
    
    /* Form elements dark mode */
    .form-label {
        color: #bdc3c7;
    }
    
    .form-input,
    .form-textarea,
    .form-select {
        background-color: #34495e;
        color: #ecf0f1;
        border-color: #5a6c7d;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }
    
    .form-input:focus,
    .form-textarea:focus,
    .form-select:focus {
        border-color: #3498db;
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.25), 0 2px 8px rgba(0, 0, 0, 0.3);
        background-color: #3c5a78;
    }
    
    .form-input:hover,
    .form-textarea:hover,
    .form-select:hover {
        border-color: #7f8c8d;
        background-color: #3c5a78;
    }
    
    .form-select {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23bdc3c7' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    }
    
    /* Validation states dark mode */
    .form-input.is-valid,
    .form-textarea.is-valid,
    .form-select.is-valid {
        border-color: #2ecc71;
        box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.25);
    }
    
    .form-input.is-invalid,
    .form-textarea.is-invalid,
    .form-select.is-invalid {
        border-color: #e67e22;
        box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.25);
    }
    
    .form-feedback.valid-feedback {
        color: #2ecc71;
    }
    
    .form-feedback.invalid-feedback {
        color: #e67e22;
    }
    
    /* Input groups dark mode */
    .input-group-prepend,
    .input-group-append {
        background-color: #2c3e50;
        border-color: #5a6c7d;
        color: #bdc3c7;
    }
    
    /* Checkbox and radio dark mode */
    .form-check-input[type="checkbox"],
    .form-check-input[type="radio"] {
        background-color: #34495e;
        border-color: #5a6c7d;
    }
    
    .form-check-input[type="checkbox"]:checked,
    .form-check-input[type="radio"]:checked {
        background-color: #3498db;
        border-color: #3498db;
    }
    
    .form-check-label {
        color: #ecf0f1;
    }
    
    /* Floating labels dark mode */
    .form-floating label {
        color: #95a5a6;
    }
    
    .form-floating .form-input:focus ~ label,
    .form-floating .form-input:not(:placeholder-shown) ~ label,
    .form-floating .form-textarea:focus ~ label,
    .form-floating .form-textarea:not(:placeholder-shown) ~ label {
        color: #bdc3c7;
    }
    
    /* Placeholder text dark mode */
    .form-input::placeholder,
    .form-textarea::placeholder {
        color: #7f8c8d;
        opacity: 1;
    }
}

/* Loading States */
.loading {
    position: relative;
    color: transparent;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.toast-success { background: #27ae60; }
.toast-error { background: #e74c3c; }
.toast-warning { background: #f39c12; }
.toast-info { background: #3498db; }

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}
