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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Login Screen Styles */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
    min-width: 300px;
}

.login-container h1 {
    color: #333;
    margin-bottom: 30px;
    font-size: 2rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-form input {
    padding: 15px;
    border: 2px solid #8B5A3C;
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.login-form input:focus {
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

.login-error {
    color: #ff4757;
    font-size: 0.9rem;
    display: none;
    margin-top: -10px;
}

.login-error.show {
    display: block;
}

.container {
    max-width: 800px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

header {
    background: linear-gradient(135deg, #8B5A3C 0%, #D4B5A0 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

.logout-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.stats {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    opacity: 0.9;
}

.card-container {
    padding: 40px;
    display: flex;
    justify-content: center;
    min-height: 500px;
}

.flash-card {
    width: 100%;
    max-width: 500px;
    height: 400px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.flash-card.flipped {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.card-front {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.card-back {
    background: linear-gradient(135deg, #e8f5e8 0%, #b8e6b8 100%);
    transform: rotateY(180deg);
    padding: 30px;
}

.card-back-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 2px solid #8B5A3C;
    padding-bottom: 10px;
}

.asana-name-back {
    color: #333;
    font-size: 1.6rem;
    margin: 0;
    flex-grow: 1;
    text-align: center;
}

.asana-image {
    height: 60%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.asana-image img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.card-content {
    flex: 1;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    background: white;
}

#asana-name {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: bold;
}

.card-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.energy-symbols {
    display: flex;
    align-items: center;
    gap: 10px;
}

.energy-types {
    display: flex;
    gap: 4px;
    align-items: center;
}

.energy-type {
    font-size: 1.2rem;
    transition: opacity 0.3s ease;
}

.energy-type.telluric {
    color: #8B4513; /* Earth brown */
}

.energy-type.cosmic {
    color: #4169E1; /* Royal blue */
}

.energy-types-back {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.energy-type-tag {
    background: linear-gradient(135deg, #8B5A3C 0%, #D4B5A0 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: capitalize;
}

.energy-type-tag.telluric {
    background: linear-gradient(135deg, #8B4513 0%, #CD853F 100%);
}

.energy-type-tag.cosmic {
    background: linear-gradient(135deg, #4169E1 0%, #87CEEB 100%);
}

.english-name {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
    text-align: center;
}

.chakras-front {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.chakra-abbrev {
    background: #8B5A3C;
    color: white;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.polar {
    font-size: 1.5rem;
    filter: grayscale(0);
    transition: filter 0.3s ease;
}

.polar.non-polar {
    filter: grayscale(1);
    opacity: 0.4;
}

.card-details h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2rem;
    border-bottom: 2px solid #8B5A3C;
    padding-bottom: 5px;
}

.card-details ul {
    list-style: none;
    margin-bottom: 20px;
}

.card-details li {
    background: rgba(139, 90, 60, 0.1);
    margin: 5px 0;
    padding: 8px 15px;
    border-radius: 8px;
    border-left: 4px solid #8B5A3C;
}

.chakras-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.chakra-tag {
    background: #8B5A3C;
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: bold;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(139, 90, 60, 0.2);
    font-weight: bold;
    color: #666;
}

.controls {
    padding: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    background: rgba(139, 90, 60, 0.05);
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #8B5A3C 0%, #D4B5A0 100%);
    color: white;
}

.btn-tertiary {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

.filter-section {
    padding: 30px;
    border-top: 1px solid rgba(139, 90, 60, 0.2);
}

.filter-section h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3rem;
}

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

.filters select {
    padding: 10px 15px;
    border: 2px solid #8B5A3C;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filters select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .stats {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .card-container {
        padding: 20px;
    }
    
    .flash-card {
        height: 350px;
    }
    
    .controls {
        padding: 20px;
    }
    
    .filters {
        flex-direction: column;
        align-items: center;
    }
    
    .filters select {
        width: 200px;
    }
}

@media (max-width: 480px) {
    #asana-name {
        font-size: 1.4rem;
    }
    
    .card-content {
        padding: 15px;
    }
    
    .card-back {
        padding: 20px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}