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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 60px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    width: 85%;
    margin: 0 auto;
}

.homepage-container {
    width: 85%;
    text-align: center;
    position: relative;
    background-image: url('/static/SCP.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.homepage-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 20px;
    z-index: 0;
}

.homepage-container > * {
    position: relative;
    z-index: 1;
}

.homepage-header {
    margin-bottom: 50px;
}

.logo-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    position: relative;
}

.mon5termatt-logo {
    max-height: 80px;
    width: auto;
    height: auto;
}

.site-logo {
    max-height: 80px;
    width: auto;
    height: auto;
}

.scp-logo {
    max-height: 100px;
    width: auto;
    height: auto;
    opacity: 0.8;
    cursor: pointer;
    transition: opacity 0.2s ease;
    filter: brightness(0) saturate(100%) invert(27%) sepia(91%) saturate(7471%) hue-rotate(348deg) brightness(91%) contrast(118%);
}

.scp-logo:hover {
    opacity: 1;
}

.scp-disclaimer {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px;
    padding: 8px 16px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease-out;
    z-index: 100;
}

.scp-disclaimer {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px;
    padding: 8px 16px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease-out;
    z-index: 100;
}

.scp-disclaimer a {
    color: inherit;
    text-decoration: none;
}

.scp-logo:hover ~ .scp-disclaimer:not(.fade-out) {
    opacity: 1;
}

.scp-disclaimer.fade-out {
    opacity: 0 !important;
}

.content-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-top: 30px;
}

.link-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    flex: 0 0 50%;
    align-items: stretch;
}

.video-section {
    flex: 0 0 50%;
    position: sticky;
    top: 20px;
}

.video-section .video-container {
    max-width: 100%;
}

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.video-dice-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.video-dice-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.video-dice-button:hover:not(:disabled) .video-count-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-100%) translateX(-50%);
}

.video-dice-button:active:not(:disabled) {
    transform: translateY(0);
}

.video-dice-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.dice-icon {
    font-size: 20px;
    line-height: 1;
}

.video-count-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1000;
    margin-bottom: 8px;
}

.video-count-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

h1 {
    color: #333;
    margin-bottom: 40px;
    font-size: 2.5em;
    font-weight: 700;
}

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

.link-card {
    display: flex;
    flex-direction: column;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: left;
    border: 2px solid transparent;
    cursor: pointer;
    height: 100%;
}

.link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
}

.main-site-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.main-site-card:hover {
    box-shadow: 0 15px 35px rgba(245, 87, 108, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.card-title {
    color: white;
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 12px;
    margin-top: 0;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.5);
    text-underline-offset: 4px;
}

.card-description {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1em;
    line-height: 1.6;
    margin: 0 0 auto 0;
    flex-grow: 1;
}

.card-link-text {
    display: inline-block;
    color: white;
    font-weight: 600;
    font-size: 0.95em;
    margin-top: 20px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    transition: all 0.2s;
    text-align: center;
    align-self: flex-start;
}

.link-card:hover .card-link-text {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.05);
}

a {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

a:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.main-site {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    margin-top: 10px;
}

.main-site:hover {
    box-shadow: 0 10px 25px rgba(245, 87, 108, 0.4);
}

/* Stores page specific styles */
.stores-container {
    width: 85%;
    padding: 40px;
    text-align: left;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    margin-bottom: 10px;
}

.back-link {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    font-size: 1em;
    margin-bottom: 20px;
    transition: color 0.2s;
    background: none;
    padding: 0;
    font-weight: normal;
}

.back-link:hover {
    color: #764ba2;
    transform: none;
    box-shadow: none;
}

.laws-button {
    display: inline-block;
    margin-left: 10px;
    padding: 4px 10px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    color: #667eea;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.laws-button:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
    transform: scale(1.05);
}

.laws-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.laws-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.laws-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 20px;
}

.laws-modal-close:hover,
.laws-modal-close:focus {
    color: #333;
}

.texas-laws-section {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 40px;
}

.laws-header {
    color: #333;
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.laws-content {
    color: #555;
    line-height: 1.8;
}

.laws-intro {
    font-size: 1.05em;
    margin-bottom: 20px;
    font-weight: 500;
}

.laws-list {
    margin: 20px 0;
}

.law-item {
    margin-bottom: 15px;
    padding-left: 20px;
    position: relative;
}

.law-item::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
    font-size: 1.2em;
}

.law-item strong {
    color: #333;
    display: block;
    margin-bottom: 5px;
}

.laws-note {
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 500;
}

.laws-disclaimer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 0.9em;
    color: #777;
}

.stores-list {
    display: grid;
    gap: 50px;
}

.state-section {
    margin-bottom: 50px;
}

.state-header {
    color: #333;
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
}

.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.store-card {
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 25px;
    background: white;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
}

.store-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.store-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 15px;
}

.store-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.store-name {
    color: #333;
    font-size: 1.6em;
    font-weight: 700;
    margin: 0;
    flex: 1;
}

.store-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.store-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #555;
    font-size: 1em;
    line-height: 1.6;
}

.store-icon {
    font-size: 1.3em;
    flex-shrink: 0;
    margin-top: 2px;
}

.store-info-value {
    flex: 1;
    word-break: break-word;
}

.store-link {
    color: #667eea;
    text-decoration: none;
    word-break: break-all;
    transition: color 0.2s;
    background: none;
    padding: 0;
    font-weight: normal;
    border-radius: 0;
}

.store-link:hover {
    color: #764ba2;
    text-decoration: underline;
    transform: none;
    box-shadow: none;
}

.address-link {
    display: block;
    line-height: 1.6;
}

.shipping-badge {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.specialty-badge {
    display: inline-block;
    padding: 6px 10px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 15px;
    font-size: 1.1em;
    flex-shrink: 0;
    cursor: help;
    transition: all 0.2s;
    position: relative;
}

.specialty-badge:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
    transform: scale(1.1);
}

.specialty-badge:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 5px;
    padding: 4px 8px;
    background: #333;
    color: white;
    border-radius: 4px;
    font-size: 0.75em;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1000;
    font-weight: 500;
}

.specialty-badge:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 1px;
    border: 4px solid transparent;
    border-top-color: #333;
    pointer-events: none;
    z-index: 1000;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 1.2em;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

.area-section {
    margin-bottom: 60px;
}

.area-header {
    color: #333;
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
}

.area-stores {
    display: grid;
    gap: 40px;
}

.video-sidebar {
    position: sticky;
    top: 20px;
}

.video-container {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.video-title {
    color: #333;
    font-size: 1.5em;
    font-weight: 700;
    margin: 0;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #2d1b4e 0%, #1a0f2e 100%);
    }
    
    .container {
        background: #1e1e1e;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    }
    
    h1 {
        color: #e0e0e0;
    }
    
    .subtitle {
        color: #b0b0b0;
    }
    
    .back-link {
        color: #9d8aff;
    }
    
    .back-link:hover {
        color: #b8a9ff;
    }
    
    /* Stores page dark mode */
    .stores-container {
        background: #1e1e1e;
    }
    
    .state-header {
        color: #e0e0e0;
        border-bottom-color: #667eea;
    }
    
    .texas-laws-section {
        background: #2a2a2a;
        border-color: #404040;
    }
    
    .laws-header {
        color: #e0e0e0;
    }
    
    .laws-content {
        color: #c0c0c0;
    }
    
    .law-item strong {
        color: #e0e0e0;
    }
    
    .laws-intro,
    .laws-note {
        color: #d0d0d0;
    }
    
    .laws-disclaimer {
        color: #999;
        border-top-color: #404040;
    }
    
    .laws-button {
        background: rgba(102, 126, 234, 0.15);
        border-color: rgba(102, 126, 234, 0.4);
        color: #9d8aff;
    }
    
    .laws-button:hover {
        background: rgba(102, 126, 234, 0.25);
        border-color: rgba(102, 126, 234, 0.6);
    }
    
    .laws-modal-content {
        background-color: #2a2a2a;
    }
    
    .laws-modal-close {
        color: #aaa;
    }
    
    .laws-modal-close:hover,
    .laws-modal-close:focus {
        color: #e0e0e0;
    }
    
    .store-card {
        background: #2a2a2a;
        border-color: #404040;
    }
    
    .store-card:hover {
        border-color: #667eea;
        box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    }
    
    .store-name {
        color: #e0e0e0;
    }
    
    .store-info-item {
        color: #c0c0c0;
    }
    
    .store-link {
        color: #9d8aff;
    }
    
    .store-link:hover {
        color: #b8a9ff;
    }
    
    .shipping-badge {
        background: linear-gradient(135deg, #4a3a7a 0%, #3a2a5a 100%);
    }
    
    .specialty-badge {
        background: rgba(102, 126, 234, 0.15);
        border-color: rgba(102, 126, 234, 0.4);
    }
    
    .specialty-badge:hover {
        background: rgba(102, 126, 234, 0.25);
        border-color: rgba(102, 126, 234, 0.6);
    }
    
    .specialty-badge:hover::after {
        background: #1e1e1e;
        border: 1px solid #404040;
        color: #e0e0e0;
    }
    
    .specialty-badge:hover::before {
        border-top-color: #1e1e1e;
    }
    
    .empty-state {
        color: #888;
    }
    
    /* Video container dark mode */
    .video-container {
        background: #2a2a2a;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    }
    
    .video-title {
        color: #e0e0e0;
    }
    
    /* Link cards dark mode - keep gradients but adjust */
    .link-card {
        opacity: 0.95;
    }
    
    .link-card:hover {
        opacity: 1;
    }
    
    /* Homepage background dark mode */
    .homepage-container::before {
        background: rgba(30, 30, 30, 0.85);
    }
    
    .scp-logo {
        opacity: 0.9;
    }
    
}

@media (max-width: 1024px) {
    .content-layout {
        flex-direction: column;
        gap: 20px;
    }
    
    .video-section {
        flex: 1;
        position: static;
        width: 100%;
        order: -1;
    }
    
    .link-cards {
        grid-template-columns: 1fr;
    }
    
    .video-container {
        padding: 8px;
    }
    
    .video-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 10px;
    }
    
    .video-title {
        font-size: 1.2em;
    }
    
    .video-dice-button {
        padding: 8px 12px;
        align-self: flex-end;
    }
    
    .video-wrapper {
        padding-bottom: 56.25%;
    }
}

@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 15px;
    }
    
    .homepage-header {
        margin-bottom: 30px;
    }
    
    .logo-container {
        gap: 15px;
        margin-bottom: 30px;
    }
    
    .mon5termatt-logo,
    .site-logo {
        max-height: 60px;
    }
    
    .scp-logo {
        max-height: 80px;
    }
    
    .link-card {
        padding: 20px;
    }
    
    .card-title {
        font-size: 1.3em;
    }
    
    .card-description {
        font-size: 0.9em;
    }
    
    .video-container {
        padding: 5px;
    }
    
    .video-header {
        margin-bottom: 8px;
        gap: 6px;
    }
    
    .video-title {
        font-size: 1.1em;
    }
    
    .content-layout {
        gap: 15px;
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        width: 98%;
        padding: 10px;
    }
    
    .logo-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .scp-disclaimer {
        position: static;
        transform: none;
        margin-top: 10px;
        white-space: normal;
        text-align: center;
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .link-card {
        padding: 15px;
    }
    
    .card-title {
        font-size: 1.1em;
        margin-bottom: 8px;
    }
    
    .card-description {
        font-size: 0.85em;
        line-height: 1.4;
    }
    
    .video-container {
        padding: 4px;
    }
    
    .video-header {
        margin-bottom: 6px;
        gap: 4px;
    }
    
    .video-title {
        font-size: 1em;
    }
    
    .video-dice-button {
        padding: 6px 10px;
    }
    
    .dice-icon {
        font-size: 18px;
    }
}

