/* Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap');

/* Root Variables */
:root {
    --itchio_ui_bg: #535646;
    --itchio_ui_bg_dark: #4d5040;
    --font-family-primary: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --itchio_bg_color: #d7e594;
    --itchio_bg2_color: rgba(215, 229, 148, 0.1);
    --itchio_bg2_sub: #c1cf7e;
    --itchio_text_color: #000000;
    --itchio_link_color: #d23810;
    --itchio_border_color: #b7c963;
    --itchio_button_color: #d23810;
    --itchio_button_fg_color: #ffffff;
    --itchio_button_shadow_color: #e94f27;
}

/* Font Face Fallbacks */
@font-face {
    font-family: 'LatoFallback';
    src: local('Lato'), local('Arial'), local('Helvetica'), local('sans-serif');
    font-display: swap;
}

/* Base Typography */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* User Tools Styling */
.user_tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
    padding: 8px 16px;
    list-style: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-family: var(--font-family-primary);
}

.user_tools li {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.user_tools .action_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
    color: var(--itchio_text_color);
    text-decoration: none;
}

.user_tools .action_btn:hover {
    background-color: rgba(210, 56, 16, 0.1);
    transform: translateY(-1px);
}

.user_tools .action_btn svg {
    width: 18px;
    height: 18px;
}

/* Main Wrapper */
.wrapper {
    --itchio_font_family: var(--font-family-primary);
    background-color: var(--itchio_bg_color);
    background-image: url(https://img.itch.zone/aW1nLzIxNTQxMzMwLnBuZw==/original/mX2Pwr.png);
    background-repeat: no-repeat;
    background-position: 50% 0;
    font-family: var(--font-family-primary);
    min-height: 100vh;
}

/* Inner Column */
.inner_column {
    color: var(--itchio_text_color);
    font-family: var(--font-family-primary);
    background-color: var(--itchio_bg2_color);
    line-height: 1.6;
    font-size: 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.inner_column ::selection {
    color: var(--itchio_button_fg_color);
    background: var(--itchio_link_color);
}

.inner_column ::-moz-selection {
    color: var(--itchio_button_fg_color);
    background: var(--itchio_link_color);
}

/* Headers */
.inner_column h1,
.inner_column h2,
.inner_column h3,
.inner_column h4,
.inner_column h5,
.inner_column h6 {
    font-family: var(--font-family-primary);
    font-weight: 900;
    color: inherit;
    line-height: 1.3;
    margin: 1.5em 0 0.8em 0;
}

.inner_column h1 {
    font-size: 2.4em;
}

.inner_column h2 {
    font-size: 1.9em;
}

.inner_column h3 {
    font-size: 1.6em;
}

/* Game Title */
.game_title {
    font-family: var(--font-family-primary);
    font-weight: 900;
    font-size: 2.8em;
    text-align: center;
    margin: 0.5em 0;
    color: var(--itchio_text_color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Paragraphs */
.inner_column p {
    margin: 1.2em 0;
    line-height: 1.7;
    font-size: 16px;
}

/* Links */
.inner_column a,
.inner_column .footer a {
    color: var(--itchio_link_color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.inner_column a:hover {
    text-decoration: underline;
    color: #b8300e;
}

/* Buttons - Genel Button Stilleri */
.inner_column .button {
    background-color: var(--itchio_button_color);
    color: var(--itchio_button_fg_color) !important;
    text-shadow: 0 1px 0px var(--itchio_button_shadow_color);
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    font-family: var(--font-family-primary);
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    min-height: 48px;
}

.inner_column .button:hover {
    background-color: #b8300e !important;
    color: var(--itchio_button_fg_color) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-decoration: none !important;
}

.inner_column .button:focus,
.inner_column .button:active,
.inner_column .button:visited {
    color: var(--itchio_button_fg_color) !important;
    text-decoration: none !important;
}

/* Download Button - Özel Stiller */
.inner_column .download_btn {
    background-color: #28a745 !important;
    color: #ffffff !important;
    text-shadow: 0 1px 0px #1e7e34 !important;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    font-weight: 700;
    font-family: var(--font-family-primary);
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
    text-align: center !important;
    vertical-align: middle;
    white-space: nowrap;
    min-height: 48px;
}

.inner_column .download_btn:hover {
    background-color: #218838 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.inner_column .download_btn:focus,
.inner_column .download_btn:active,
.inner_column .download_btn:visited {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Button Message */
.button_message {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    font-family: var(--font-family-primary);
}

.buy_message {
    font-size: 14px;
    color: #666;
    font-family: var(--font-family-primary);
    font-weight: 500;
}

.buy_message .sub {
    font-style: italic;
}

/* Tables */
.inner_column table {
    border-color: var(--itchio_border_color);
    font-family: var(--font-family-primary);
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.inner_column td,
.inner_column th {
    font-family: var(--font-family-primary);
    font-size: 14px;
    line-height: 1.5;
    padding: 12px 16px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.inner_column td:first-child {
    font-weight: 700;
    width: 140px;
    background: rgba(0, 0, 0, 0.02);
}

.inner_column tr:hover {
    background: rgba(0, 0, 0, 0.03);
}

/* HR */
.inner_column hr {
    background-color: var(--itchio_border_color);
    border: none;
    height: 2px;
    margin: 2em 0;
    border-radius: 1px;
}

/* More Information Toggle */
.more_information_toggle {
    margin: 32px 0;
}

.toggle_row {
    margin-bottom: 16px;
}

.toggle_info_btn {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--itchio_link_color);
    text-decoration: none;
    font-family: var(--font-family-primary);
    font-size: 16px;
    transition: color 0.2s ease;
}

.toggle_info_btn:hover {
    color: #b8300e;
    text-decoration: underline;
}

.info_panel_wrapper {
    display: none;
    margin-top: 16px;
    animation: fadeIn 0.3s ease;
}

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

/* Game Info Panel */
.game_info_panel_widget {
    background: rgba(255, 255, 255, 0.05);
}

/* Star Rating */
.star_value {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.star_fill {
    color: var(--itchio_link_color);
    display: flex;
    gap: 2px;
}

.star {
    font-size: 16px;
    color: inherit;
}

.aggregate_rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-family-primary);
}

.rating_count {
    font-size: 14px;
    color: #666;
}

/* Upload List */
.upload_list_widget {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.upload {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.upload:last-child {
    border-bottom: none;
}

.upload_name {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-family: var(--font-family-primary);
}

.upload_name .name {
    font-weight: 700;
    color: var(--itchio_text_color);
}

.file_size {
    color: #666;
    font-size: 14px;
    font-family: var(--font-family-primary);
}

.download_platforms {
    background: rgba(233, 236, 239, 0.3);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #495057;
    font-weight: 500;
}

/* Development Log */
.game_devlog {
    margin: 40px 0;
}

.game_devlog h2 {
    margin-bottom: 20px;
}

.game_devlog ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.game_devlog li {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    margin: 12px 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.game_devlog li:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.game_devlog a {
    font-weight: 600;
    font-size: 16px;
}

.post_date {
    color: #666;
    font-size: 14px;
    margin-top: 8px;
    font-family: var(--font-family-primary);
}

/* Game Frame */
.game_frame {
    background: var(--itchio_bg2_sub);
    border-radius: 8px;
    overflow: hidden;
}

.game_frame .embed_info {
    background-color: rgba(215, 229, 148, 0.85);
}

/* Loading */
.game_loading .loader_bar .loader_bar_slider {
    background-color: var(--itchio_link_color);
}

/* View Game Page */
.view_game_page .reward_row,
.view_game_page .bundle_row {
    border-color: var(--itchio_bg2_sub) !important;
}

.view_game_page .rewards .quantity_input {
    background: rgba(235, 240, 215, 0);
    border-color: rgba(0, 0, 0, 0.3);
    color: var(--itchio_text_color);
    font-family: var(--font-family-primary);
}

/* Header */
.header {
    text-align: center;
    margin: 20px 0 40px 0;
}

.header img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Buy Row */
.header_buy_row {
    background: rgba(255, 255, 255, 0.1);
    padding: 24px;
    border-radius: 12px;
    margin: 24px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.header_buy_row p {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: #666;
}

/* Formatted Description */
.formatted_description {
    background: rgba(255, 255, 255, 0.1);
    padding: 32px;
    border-radius: 12px;
    margin: 32px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.formatted_description img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Hide Unwanted Elements */
div[style*="position: fixed"],
div[style*="z-index: 2147483644"],
div[style*="z-index: 2147483647"],
div[style*="z-index: 2147483646"],
#give-freely-root-ejkiikneibegknkgimmihdpcbcedgmpo,
iframe[src*="chrome-extension"] {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .inner_column {
        padding: 16px;
        font-size: 14px;
    }
    
    .game_title {
        font-size: 2.2em;
    }
    
    .inner_column h1 {
        font-size: 2em;
    }
    
    .inner_column h2 {
        font-size: 1.6em;
    }
    
    .button_message {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .user_tools {
        padding: 6px 12px;
        gap: 6px;
    }
    
    .user_tools .action_btn {
        padding: 8px;
    }
    
    .inner_column td:first-child {
        width: 100px;
        font-size: 13px;
    }
    
    .upload_name {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .formatted_description {
        padding: 20px;
    }
    
    .header_buy_row {
        padding: 20px;
    }
    
    .inner_column .button,
    .inner_column .download_btn {
        padding: 12px 20px;
        font-size: 14px;
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    .game_title {
        font-size: 1.8em;
    }
    
    .inner_column .button,
    .inner_column .download_btn {
        padding: 10px 16px;
        font-size: 13px;
        min-height: 40px;
    }
    
    .user_tools {
        justify-content: center;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    .inner_column {
        color: #000000;
    }
    
    .inner_column a {
        color: #0000EE;
        text-decoration: underline;
    }
    
    .download_btn {
        border: 2px solid #000000 !important;
    }
}

/* Print Styles */
@media print {
    .user_tools,
    .download_btn,
    .button {
        display: none !important;
    }
    
    .inner_column {
        color: #000000 !important;
        background: white !important;
    }
    
    .wrapper {
        background: white !important;
    }
}

/* Focus States for Accessibility */
.user_tools .action_btn:focus,
.inner_column .button:focus,
.inner_column .download_btn:focus,
.toggle_info_btn:focus {
    outline: 2px solid var(--itchio_link_color);
    outline-offset: 2px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Success States */
.success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}
