/* Sexopoly Game Styles */

/* === Start Page === */
.sexopoly-start-section {
    margin-bottom: 3rem;
}

.sexopoly-areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.sexopoly-area-option input[type="checkbox"] {
    display: none;
}

.sexopoly-area-option {
    cursor: pointer;
}

.sexopoly-area-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.sexopoly-area-option input[type="checkbox"]:checked + .sexopoly-area-card {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.sexopoly-area-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

.sexopoly-area-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.sexopoly-area-name {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.sexopoly-rules {
    font-size: 0.95rem;
}

.sexopoly-rule-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sexopoly-rule-item:last-child {
    border-bottom: none;
}

.sexopoly-rule-item ul {
    margin-top: 0.5rem;
    margin-left: 1.5rem;
}

.sexopoly-rule-item li {
    margin-bottom: 0.3rem;
}

.sexopoly-game-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.sexopoly-game-info {
    flex: 1;
}

.sexopoly-game-players {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.sexopoly-game-stats {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.sexopoly-game-actions {
    margin-left: 1rem;
}

/* === Game Page === */
.sexopoly-header {
    text-align: center;
    margin-bottom: 2rem;
}

.sexopoly-players-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.sexopoly-player-card {
    flex: 1;
    max-width: 200px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid;
    border-radius: 8px;
    text-align: center;
}

.sexopoly-player-name {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.sexopoly-current-mark {
    display: inline-block;
    margin-left: 0.5rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.sexopoly-player-score {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.7);
}

.sexopoly-vs {
    font-size: 1.2rem;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.5);
}

.sexopoly-password {
    text-align: center;
    padding: 0.8rem;
    background: rgba(255, 152, 0, 0.1);
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.sexopoly-closed-areas {
    text-align: center;
    margin-bottom: 1.5rem;
}

.sexopoly-closed-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(76, 175, 80, 0.2);
    border-radius: 15px;
    margin: 0.2rem;
    font-size: 0.9rem;
}

/* === Game Board === */
.sexopoly-board-wrapper {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin: 2rem auto;
    max-width: 1600px;
    padding: 0 1rem;
}

.sexopoly-board-container {
    flex: 1;
    min-width: 700px;
    max-width: 1000px;
}

.sexopoly-board {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 10px;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

.sexopoly-cell {
    position: relative;
    aspect-ratio: 1;
    min-height: 100px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sexopoly-cell-closed {
    opacity: 0.4;
    background: rgba(100, 100, 100, 0.3) !important;
}

.sexopoly-cell-icon {
    font-size: 2.5rem;
    margin-bottom: 0.3rem;
}

.sexopoly-cell-level {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    color: white;
}

.sexopoly-cell-closed-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.3);
}

.sexopoly-player-marker {
    position: absolute;
    bottom: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
    border: 2px solid white;
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.sexopoly-has-player1 .sexopoly-player-marker {
    left: 4px;
}

.sexopoly-has-player2 .sexopoly-player-marker {
    right: 4px;
}

.sexopoly-cell-pos {
    position: absolute;
    bottom: 2px;
    left: 4px;
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.3);
}

/* === Control Panel (Side Panel) === */
.sexopoly-control-panel {
    width: 300px;
    flex-shrink: 0;
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.95), rgba(20, 20, 20, 0.95));
    border-radius: 15px;
    padding: 2rem 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 2rem;
    align-self: flex-start;
}

.sexopoly-turn-info {
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sexopoly-dice-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.sexopoly-dice-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.sexopoly-dice-button .icon {
    font-size: 2rem;
}

.sexopoly-dice-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.sexopoly-waiting-fant {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 152, 0, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.sexopoly-waiting-fant .icon {
    font-size: 2rem;
    color: #FF9800;
    margin-bottom: 0.5rem;
    animation: pulse 1.5s ease-in-out infinite;
}

.sexopoly-waiting-fant p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.sexopoly-turn-status {
    text-align: center;
    padding: 1rem;
    background: rgba(76, 175, 80, 0.15);
    border-radius: 10px;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.sexopoly-turn-status .icon {
    font-size: 1.5rem;
    color: #4CAF50;
    margin-bottom: 0.5rem;
}

.sexopoly-turn-status p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    line-height: 1.4;
}

.sexopoly-areas-status {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* === Dice Animation === */
.sexopoly-dice-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9998;
    animation: fadeIn 0.3s ease;
}

.sexopoly-dice-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.98), rgba(20, 20, 20, 0.98));
    padding: 3rem 4rem;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sexopoly-dice-cube {
    width: 120px;
    height: 120px;
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: bold;
    color: #333;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6),
    inset 0 2px 10px rgba(255, 255, 255, 0.8),
    inset 0 -2px 10px rgba(0, 0, 0, 0.2);
    animation: diceRoll 1.2s ease-out;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.sexopoly-dice-cube::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 15px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4), transparent);
    pointer-events: none;
}

@keyframes diceRoll {
    0% {
        transform: rotate3d(1, 1, 1, 0deg) scale(1);
    }
    20% {
        transform: rotate3d(1, 0.5, 0.5, 180deg) scale(1.15);
    }
    40% {
        transform: rotate3d(0.5, 1, 0.5, 360deg) scale(0.95);
    }
    60% {
        transform: rotate3d(0.5, 0.5, 1, 540deg) scale(1.1);
    }
    80% {
        transform: rotate3d(1, 1, 0.5, 720deg) scale(0.98);
    }
    100% {
        transform: rotate3d(1, 1, 1, 720deg) scale(1);
    }
}

@keyframes diceStop {
    0% {
        transform: rotate3d(1, 1, 1, 720deg) scale(1);
    }
    50% {
        transform: rotate3d(1, 1, 1, 720deg) scale(1.2);
    }
    100% {
        transform: rotate3d(1, 1, 1, 720deg) scale(1);
    }
}

.sexopoly-dice-result {
    margin-top: 2rem;
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.5s ease 1s both, glow 1.5s ease-in-out 1s infinite alternate;
}

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

@keyframes glow {
    from {
        filter: drop-shadow(0 0 5px rgba(102, 126, 234, 0.5));
    }
    to {
        filter: drop-shadow(0 0 15px rgba(102, 126, 234, 0.8));
    }
}

/* === Player Marker Movement === */
.sexopoly-player-marker.moving {
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.2s ease-out;
    animation: none;
}

/* === Fant Modal === */
.sexopoly-fant-content {
    background: rgba(30, 30, 30, 0.95);
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

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

.sexopoly-fant-header {
    padding: 1.5rem;
    text-align: center;
    color: white;
}

.sexopoly-fant-area {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.sexopoly-fant-level {
    font-size: 1rem;
    opacity: 0.9;
}

.sexopoly-fant-body {
    padding: 2rem;
}

.sexopoly-fant-text {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
}

.sexopoly-fant-timer {
    text-align: center;
    padding: 0.8rem;
    background: rgba(255, 152, 0, 0.2);
    border-radius: 6px;
    margin-bottom: 1rem;
    color: #FF9800;
}

.sexopoly-fant-executor,
.sexopoly-fant-evaluator {
    text-align: center;
    margin-bottom: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.sexopoly-fant-actions {
    padding: 0 2rem 2rem;
    text-align: center;
}

.sexopoly-fant-actions form {
    margin: 0.5rem;
}

.sexopoly-fant-warning {
    text-align: center;
    padding: 1rem 2rem 1.5rem;
    color: rgba(244, 67, 54, 0.8);
    font-size: 0.9rem;
}

/* === Legend === */
.sexopoly-legend {
    text-align: center;
    margin: 2rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.sexopoly-legend-title {
    font-weight: bold;
    margin-bottom: 0.8rem;
}

.sexopoly-legend-items {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.sexopoly-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sexopoly-legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

/* === Result Page === */
.sexopoly-result-header {
    text-align: center;
    margin-bottom: 3rem;
}

.sexopoly-result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.sexopoly-final-scores {
    margin-bottom: 3rem;
}

.sexopoly-score-cards {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
}

.sexopoly-score-card {
    flex: 1;
    max-width: 250px;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 3px solid;
    border-radius: 12px;
    text-align: center;
}

.sexopoly-score-player {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.sexopoly-winner-crown {
    display: inline-block;
    margin-left: 0.5rem;
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.sexopoly-score-value {
    font-size: 3rem;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.9);
}

.sexopoly-score-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
}

.sexopoly-score-vs {
    font-size: 1.5rem;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.3);
}

.sexopoly-winner-announce {
    text-align: center;
    font-size: 1.2rem;
    padding: 1rem;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 8px;
    margin-top: 1rem;
}

.sexopoly-areas-stats {
    margin-bottom: 3rem;
}

.sexopoly-areas-list {
    margin-top: 1rem;
}

.sexopoly-area-stat-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.sexopoly-area-closed {
    background: rgba(76, 175, 80, 0.1);
}

.sexopoly-area-stat-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.sexopoly-area-stat-icon {
    font-size: 1.5rem;
}

.sexopoly-area-stat-name {
    font-size: 1.1rem;
    font-weight: bold;
}

.sexopoly-area-stat-badge {
    margin-left: auto;
    padding: 0.3rem 0.8rem;
    background: rgba(76, 175, 80, 0.3);
    border-radius: 15px;
    font-size: 0.85rem;
}

.sexopoly-area-stat-bars {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.sexopoly-area-stat-bar {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.sexopoly-stat-bar-container {
    flex: 1;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.sexopoly-stat-bar-fill {
    height: 100%;
    transition: width 0.5s ease;
}

.sexopoly-game-info {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 2rem;
}

.sexopoly-info-item {
    margin-bottom: 0.8rem;
}

.sexopoly-info-item:last-child {
    margin-bottom: 0;
}

.sexopoly-motivation {
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.sexopoly-result-actions {
    text-align: center;
    margin: 2rem 0;
}

.sexopoly-result-actions .button {
    margin: 0.5rem;
}

/* === Responsive === */
@media screen and (max-width: 1680px) {
    #main article, #other article {
        width: 50rem;
    }
}

@media screen and (max-width: 1400px) {
    .sexopoly-control-panel {
        width: 100%;
        background: linear-gradient(145deg, rgba(30, 30, 30, 0.95), rgba(20, 20, 20, 0.95));
        border-radius: 15px;
        padding: 2rem 1.5rem;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.1);
        display: block;
        flex-shrink: unset;
    }
}

@media screen and (max-width: 1280px) {
    .sexopoly-board-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .sexopoly-control-panel {
        width: 100%;
        position: static;
        order: -1;
        padding-bottom: 0;
    }

    .sexopoly-dice-button {
        padding: 0.5rem;
    }

    .sexopoly-board-container {
        width: 100%;
    }

    .sexopoly-board {
        width: 100%;
        max-width: 800px;
        margin: 0 auto;
    }
}
@media screen and (max-width: 768px) {
    .sexopoly-players-info {
        flex-direction: column;
    }

    .sexopoly-board-container {
        min-width: unset;
    }

    .sexopoly-board {
        position: relative;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(4, 1fr);
        gap: 10px;
        padding: 1.5rem;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 12px;
    }

    .sexopoly-control-panel {
        padding: 1.5rem 1rem;
        max-width: 100%;
    }

    .sexopoly-dice-button {
        padding: 1.2rem;
        font-size: 1rem;
    }

    .sexopoly-dice-button .icon {
        font-size: 1.5rem;
    }

    .sexopoly-score-cards {
        flex-direction: column;
    }

    .sexopoly-fant-content {
        margin: 1rem;
    }

    .sexopoly-areas-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


@media screen and (max-width: 605px) {
        .sexopoly-board {
        position: relative;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 1fr);
        gap: 10px;
        padding: 1.5rem;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 12px;
    }
}