/* Basic styles for tap-app */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 2rem 1rem;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

header p {
    opacity: 0.9;
    font-size: 1rem;
}

main {
    padding: 2rem 1rem 5rem;
    max-width: 1200px;
    margin: 0 auto;
}

#session-viewer {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#session-viewer h2 {
    color: #667eea;
    margin-bottom: 1rem;
}

#session-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

#session-controls button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
    font-size: 0.875rem;
}

#session-controls .btn-secondary {
    background: #4CAF50;
    color: white;
}

#session-controls .btn-danger {
    background: #f44336;
    color: white;
}

#session-controls button:active {
    opacity: 0.7;
}

#session-summary {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

#session-summary h3 {
    color: #667eea;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

#session-summary h4 {
    color: #666;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

#session-summary ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

#session-summary li {
    margin-bottom: 0.25rem;
}

.session-item {
    background: #f9f9f9;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    border-left: 3px solid #667eea;
    font-size: 0.875rem;
    line-height: 1.6;
}

.test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.test-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.test-card[data-rank="1"] {
    border: 2px solid #FFD700;
}

.test-card[data-rank="2"] {
    border: 2px solid #C0C0C0;
}

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

.test-card.coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rank-badge {
    font-size: 1.25rem;
    font-weight: bold;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.recommended {
    background: #4CAF50;
    color: white;
}

.status-badge.needs-work {
    background: #FF9800;
    color: white;
}

.status-badge.coming-soon-badge {
    background: #9E9E9E;
    color: white;
}

.test-card h2 {
    color: #667eea;
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    color: #FFD700;
    font-size: 1.25rem;
    letter-spacing: 2px;
}

.rating-text {
    color: #666;
    font-weight: 600;
    font-size: 0.875rem;
}

.test-card p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.pros-cons {
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.pros {
    color: #4CAF50;
    margin-bottom: 0.25rem;
}

.cons {
    color: #f44336;
    margin-bottom: 0.25rem;
}

.user-rating-section {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #e0e0e0;
}

.user-rating-section label {
    display: block;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.interactive-stars {
    display: inline-flex;
    gap: 0.25rem;
    margin-right: 0.5rem;
}

.interactive-stars .star {
    font-size: 1.75rem;
    color: #FFD700;
    cursor: pointer;
    transition: transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}

.interactive-stars .star:hover {
    transform: scale(1.2);
}

.interactive-stars .star:active {
    transform: scale(0.9);
}

.clear-rating-btn {
    padding: 0.25rem 0.75rem;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.clear-rating-btn:active {
    opacity: 0.7;
}

.user-notes {
    width: 100%;
    min-height: 60px;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.875rem;
    resize: vertical;
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}

.user-notes:focus {
    outline: none;
    border-color: #667eea;
}

.user-notes::placeholder {
    color: #aaa;
}

.default-label {
    font-size: 0.75rem;
    color: #999;
    margin-left: 0.25rem;
}

.library-links {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.lib-link {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    background: #f0f0f0;
    color: #667eea;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #e0e0e0;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.lib-link:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.lib-link:active {
    transform: scale(0.95);
}

.btn {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.btn:hover, .btn:active {
    opacity: 0.9;
}

footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 1rem;
    position: fixed;
    bottom: 0;
    width: 100%;
}

@media (max-width: 768px) {
    .test-grid {
        grid-template-columns: 1fr;
    }

    header h1 {
        font-size: 1.5rem;
    }
}
