@font-face {
    font-family: 'Anton';
    src: url('fonts/Anton-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto Condensed';
    src: url('fonts/RobotoCondensed-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto Condensed';
    src: url('fonts/RobotoCondensed-Italic-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-style: italic;
}

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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Roboto Condensed', sans-serif;
    background: #1a1a1a;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    margin: 0 auto;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.container.visible {
    opacity: 1;
}

.state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
}

.state.active {
    display: flex;
}

/* Baseball Card Container */
.card-container {
    position: relative;
    width: 100%;
    flex: 1;
    margin: 0;
    cursor: grab;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
}

.card-container:active {
    cursor: grabbing;
}

#card-canvas-loading,
#card-canvas-ready {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 100%;
    display: block;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    margin: 0;
    object-fit: contain;
}

/* Loading Bar */
.loading-bar-container {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 400px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    z-index: 10;
    margin-bottom: 10px;
}

.loading-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff4444, #ff8844, #ff4444);
    background-size: 200% 100%;
    animation: loadingBar 2s ease-in-out infinite;
    border-radius: 2px;
    transition: width 0.1s linear;
}

@keyframes loadingBar {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 200% 0%;
    }
}

/* Logo Top Left */
.logo-top-left {
    position: fixed;
    top: 2vh;
    left: 2vh;
    z-index: 250;
    width: 8vh;
    height: 8vh;
    transition: opacity 0.2s ease;
}

/* Logo in video overlay */
#video-state .logo-top-left {
    position: fixed;
    top: 2vh;
    left: 2vh;
    width: 8vh;
    height: 8vh;
}

.logo-top-left.clickable {
    cursor: pointer;
}

.logo-top-left.clickable:hover {
    opacity: 0.8;
}

.logo-top-left img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Message Styling */
.message {
    text-align: center;
    padding: 10px 20px 40px 20px;
    width: 100%;
    flex-shrink: 0;
    z-index: 10;
}

.message h2 {
    font-family: 'Anton', sans-serif;
    font-size: 32px;
    color: #ff4444;
    text-transform: uppercase;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
    font-weight: normal;
}

.message p {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 18px;
    color: #ffffff;
    font-weight: 300;
}

/* Video Overlay */
#video-state {
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 200;
}

#video-state.active {
    animation: fadeIn 0.3s ease;
}

.video-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: min(90vw, 90%);
    max-height: 68vh;
    margin-top: 12vh;
    position: relative;
}

.video-close-btn {
    position: fixed;
    top: 2vh;
    right: 2vh;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 8vh;
    height: 8vh;
    font-size: 4vh;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 250;
    transition: all 0.2s ease;
}

.video-close-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

/* Video Container */
.video-container {
    position: relative;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 55vh;
    background: #000;
    border-radius: 1.5vh;
    overflow: hidden;
    box-shadow: 0 2vh 6vh rgba(0, 0, 0, 0.8);
}

#player-video {
    width: 100%;
    height: 100%;
    max-height: 100%;
    display: block;
    background: #000;
    object-fit: contain;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px;
}

.logo-container {
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.state.active {
    animation: fadeIn 0.5s ease-out;
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .message {
        padding: 1vh 3vw 3vh 3vw;
    }
    
    .message h2 {
        font-size: min(22px, 5vw);
        margin-bottom: 1vh;
    }
    
    .message p {
        font-size: min(15px, 4vw);
    }
    
    .logo-container {
        width: 8vh;
        height: 8vh;
        padding: 1vh;
    }
}

/* Portrait orientation specific */
@media (orientation: portrait) {
    .container {
        max-width: 100%;
    }
}

/* Video Actions Buttons */
.video-actions {
    display: flex;
    flex-direction: row;
    gap: 2vw;
    justify-content: center;
    padding: 0 2vw;
    margin-top: 2vh;
    margin-bottom: 3vh;
    flex-shrink: 0;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 1vw;
    padding: 1.5vh 3vw;
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a1a;
    border: none;
    border-radius: 3vh;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: min(2vh, 4vw);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0.5vh 1.5vh rgba(0, 0, 0, 0.3);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-0.3vh);
    box-shadow: 0 0.8vh 2vh rgba(0, 0, 0, 0.4);
}

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

.action-btn svg {
    width: 2.5vh;
    height: 2.5vh;
}

.action-btn span {
    display: inline;
}

/* Share Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #ffffff;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0;
    color: #1a1a1a;
    font-family: 'Anton', sans-serif;
    font-size: 24px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: #1a1a1a;
}

.modal-body {
    padding: 24px;
}

/* Shareon Customization */
.shareon {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}

.shareon a {
    border-radius: 50%;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.shareon a::before {
    font-size: 28px !important;
    width: 28px !important;
    height: 28px !important;
}

/* Copy Link Section */
.copy-link {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.copy-link input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 14px;
    color: #1a1a1a;
}

.copy-link button {
    padding: 12px 20px;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.copy-link button:hover {
    background: #333;
}

.copy-link button:active {
    background: #000;
}

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

@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-header h3 {
        font-size: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
}

