/* Updated CSS for full screen layout with new structure */
.rank-game-container {
    width: 100vw;
    max-width: none;
    margin: 0;
    padding: 20px;
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

body.has-rank-game-shortcode .other-search-engines-container {
   
    border-radius: 10px;
}
body.has-rank-game-shortcode .other-search-link {
    display: inline-block;
    background: linear-gradient(45deg, #53bfcc, #4c3a90); /* Màu tím đậm hơn */
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(76, 58, 144, 0.3);
    padding-top: 8px;
	padding-bottom: 8px;
	padding-right: 5px;
}

body.has-rank-game-shortcode .other-search-link:hover {
	background: linear-gradient(45deg, #eb4f5c, #4c3a90);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(76, 58, 144, 0.5);
    text-decoration: none;
    color: white;
}

.rank-game-copy a {
    font-weight: bold;
    color: #ffffff !important;
}
.ws {
  padding: 0px !important;
}
body.has-rank-game-shortcode .row {
    margin-left: calc(var(--bs-gutter-x) * -1);
}
body.has-rank-game-shortcode .container {
  max-width: 100% !important;
}
body.has-rank-game-shortcode #content {
	padding-top: 0px !important; 
    padding-bottom: 0px !important 
}
body.has-rank-game-shortcode .entry-content a {
	border-right: none  !important;
}
}
body.has-rank-game-shortcode #content {
    padding-top: 0px;
    padding-bottom: 0px;
}
body.has-rank-game-shortcode h1 {

	font-size: 25px;
    margin-bottom: 0px !important; 
}
body.has-rank-game-shortcode .rank-game-video {
 	display: flex;
  justify-content: flex-start;
}
.rank-game-copy{margin-top: -50px;}
body.has-rank-game-shortcode .rank-game-video iframe {
  display: block;
  margin-top: -80px;
}
/* Rank Game page: Remove left padding */
body.has-rank-game-shortcode .overlay-element {
  pointer-events: none !important;
}
/* Và nếu có lớp cha che */
body.has-rank-game-shortcode .google-link-container {
  position: relative;
  z-index: 0;
}
body {
    background-color: unset !important;
    color: unset !important;
    font-family: unset !important;
    font-size: unset !important;
    font-weight: unset !important;
    letter-spacing: unset !important;
    line-height: unset !important;
    --wp--style--root--padding-top: unset !important;
    --wp--style--root--padding-right: unset !important;
    --wp--style--root--padding-bottom: unset !important;
    --wp--style--root--padding-left: unset !important;
}
.rank-game-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="90" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="40" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

/* Top Row - Title, Wheels, and Legends */
.rank-game-top-row {
    display: flex;
    flex: 1;
    gap: 30px;
    position: relative;
    z-index: 1;
    align-items: stretch;
    min-height: calc(100vh - 200px);
}

/* Bottom Row - Controls */
.rank-game-bottom-row {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    position: relative;
    z-index: 1;
}

/* Left Column - Title and Description */
.rank-game-left-column {
    flex: 0 0 25%;
  /*  display: flex;  */
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.rank-game-title-section h1 {
	color: #eb4f5c; 
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 30px;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.rank-game-col-1 h3,
.rank-game-col-2 h3,
.rank-game-col-3 h3,
.legend-column h3 {
  color: #4c3a90; /* IDS Purple for subheadings */
  font-size: 1.4rem;
  margin-bottom: 15px;
}


.rank-game-copy strong {
    color: #ffd700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Center Column - Wheels */
.rank-game-center-column {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.wheels-container {
    display: flex;
    gap: 50px;
    align-items: center;
    justify-content: center;
}

.wheel-section {
    text-align: center;
}

.wheel-section h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #ffd700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Right Column - Legends in Two Columns */
.rank-game-right-column {
    flex: 0 0 35%;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
	min-height:820px;
	transform: none !important
}

.legends-section {
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20px;
}

.legends-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    width: 100%;
    height: 100%;
    align-items: start;
}

.legend-column {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.legend-column h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #ffd700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    text-align: center;
}

.color-legend {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - 300px);
}

/* Hide scrollbar but keep functionality */
.color-legend::-webkit-scrollbar {
    width: 8px;
}

.color-legend::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.color-legend::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 10px;
}

.color-legend::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.5);
}


/* Updated CSS for wheel pointers - Fixed positioning */
.wheel-container {
    width: 250px;
    height: 250px;
    margin: 0 auto;
    position: relative; /* Add this to establish positioning context */
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    transition: transform 0.3s ease;
    box-shadow: 0 0 30px rgba(0,0,0,0.4);
    border: 5px solid #ffd700;
}

.rank-game-top-row {
  min-width: 0; /* Fix flex rounding error */
}

.rank-game-center-column {
  flex: 1 0 auto; /* Ngăn flex-shrink */
  min-width: 0;
}

/* Thêm vào rank-game.css */
.result-text, .legend-text, .combination-display {
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.keyword-result, .geography-result {
  display: inline-block;
  max-width: 100%;
}
.rank-game-top-row {
  align-items: flex-start; /* Ngăn co giãn đồng đều */
}

.wheels-container {
  flex-wrap: wrap; /* Cho phép xuống dòng nếu cần */
}


.wheel-sections {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.wheel-pointer {
    position: absolute;
    top: -10px; /* Changed from -15px to -10px */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent; /* Reduced from 20px to 15px */
    border-right: 15px solid transparent; /* Reduced from 20px to 15px */
    border-top: 25px solid #ffd700; /* Reduced from 30px to 25px */
    z-index: 10;
}

.wheel-pointer-alternative {
    position: absolute;
    top: -5px; /* Even closer to the wheel */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 20px solid #ffd700;
    z-index: 10;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}


/* Controls */
.rank-game-controls {
    text-align: center;
    width: 100%;
    max-width: 800px;
}

.spin-btn {
    background: linear-gradient(45deg, #eb4f5c, #4c3a90); /* Red to Purple */
    color: #ffffff;
    border: none;
    padding: 20px 40px;
    font-size: 1.4rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.spin-btn:hover {
	background: linear-gradient(45deg, #53bfcc, #4c3a90); /* Teal to Purple hover */
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 107, 107, 0.6);
}

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

.spin-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Game Result */
.game-result {
   
}

.result-combination h3 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.combination-display {
    font-size: 16px;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border-left: 4px solid #ffd700;
	border: 2px solid #53bfcc; /* Teal border for clarity */
}

.keyword-result, .geography-result {
    font-weight: bold;
    color: #ffd700;
}

body.has-rank-game-shortcode .google-link {
    display: inline-block;
	background: linear-gradient(45deg, #53bfcc, #4c3a90); /* Teal to Purple */
    color: #ffffff;
    text-decoration: none;
    border-radius: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(76, 58, 144, 0.3);
    letter-spacing: 0.5px;
	padding-top: 8px;
	padding-bottom: 8px;
	padding-right:10px;
	margin-right: 10px
}
body.has-rank-game-shortcode .google-link1 {
    display: inline-block;
    background: linear-gradient(45deg, #4285f4, #34a853);
    color: white;
    text-decoration: none;
	text-align:center;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(66, 133, 244, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
body.has-rank-game-shortcode .google-link1:hover {
	background: linear-gradient(45deg, #eb4f5c, #4c3a90); /* Red to Purple hover */
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(66, 133, 244, 0.5);
    text-decoration: none;
    color: white;
}
	
body.has-rank-game-shortcode .google-link:hover {
	background: linear-gradient(45deg, #eb4f5c, #4c3a90); /* Red to Purple hover */
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(66, 133, 244, 0.5);
    text-decoration: none;
    color: white;
}

/* Wheel Result Display */
.wheel-result {
	width: 200px;
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 215, 0, 0.2);
    border-radius: 10px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
	border: 1px solid #4c3a90; /* Purple accent border */
}

.wheel-result.show {
    background: rgba(255, 215, 0, 0.3);
    transform: scale(1.02);
}

.result-text {
    font-size: 16px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    text-align: center;
}

.result-placeholder {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

/* Legend Styles */
.legend-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
   /* padding: 8px;*/
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.legend-row:hover {
    background: rgba(255, 255, 255, 0.1);
}
.wp-block-post-title{display:none}
.legend-row.highlight {
    background: rgba(255, 215, 0, 0.3) !important;
    border: 2px solid #ffd700 !important;
    transform: scale(1.02);
}

.legend-row.highlight .legend-text {
    color: #ffd700 !important;
    font-weight: bold;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.legend-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    word-break: break-word;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .rank-game-title-section h1 {
        font-size: 2.8rem;
    }
    
    .rank-game-copy p {
        font-size: 1.1rem;
    }
    
    .legends-two-columns {
        gap: 20px;
    }
    
    .legend-column h3 {
        font-size: 1.2rem;
    }
    
    .wheel-container {
        width: 220px;
        height: 220px;
    }
    
    .wheel-pointer {
        top: -8px;
        border-left: 12px solid transparent;
        border-right: 12px solid transparent;
        border-top: 20px solid #ffd700;
    }
}

@media (max-width: 1200px) {
    .rank-game-top-row {
        flex-direction: column;
        min-height: auto;
    }
    
    .rank-game-left-column {
        flex: none;
        order: 1;
    }
    
    .rank-game-center-column {
        flex: none;
        order: 2;
        padding: 20px 0;
    }
    
    .rank-game-right-column {
        flex: none;
        order: 3;
    }
    
    .legends-two-columns {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .rank-game-title-section h1 {
        font-size: 2.5rem;
    }
    
    .wheels-container {
        flex-direction: row;
        gap: 30px;
    }
    
    .color-legend {
        max-height: 300px;
    }
}

@media (max-width: 768px) { 
    .rank-game-container {
        padding: 15px;
    }
    
    .rank-game-top-row {
        gap: 20px;
    }
    
    .rank-game-title-section h1 {
        font-size: 2rem;
    }
    
    .rank-game-copy p {
        font-size: 1rem;
    }
    
    .wheel-container {
        width: 180px;
        height: 180px;
    }
    
    .wheel-pointer {
        top: -6px;
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
        border-top: 18px solid #ffd700;
    }
    
    .wheels-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .legend-text {
        font-size: 0.8rem;
    }
    
    .legends-two-columns {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .rank-game-center-column {
        flex: 0 0 auto;
    }
    
    .rank-game-right-column {
        flex: 0 0 auto;
    }
    
    .color-legend {
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .rank-game-title-section h1 {
        font-size: 1.8rem;
    }
    
     .wheel-container {
        width: 150px;
        height: 150px;
    }
    
    .wheel-pointer {
        top: -5px;
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-top: 15px solid #ffd700;
    }
    
    .spin-btn {
        padding: 15px 25px;
        font-size: 1.1rem;
    }
    
    .google-link {
        padding: 15px 25px;
        font-size: 1rem;
    }
    
    .legends-two-columns {
        gap: 10px;
    }
    
    .color-legend {
        max-height: 200px;
    }
}

.color-legend .legend-row {
  background: #53bfcc; /* Teal blocks for legend */
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 3px;
  margin-bottom: 5px;
}

.color-legend .legend-row.highlight {
  background: rgba(235,79,92,0.85); /* IDS Red highlight */
  border: 2px solid #ffffff;
}

.legend-column h3 {
  color: #4c3a90; /* Purple for legend titles */
}

.legend-text {
  font-weight: 600;
}

/* Thêm các CSS mới này vào file rank-game.css */

/* Container cho các control */
.wheel-controls-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 20px auto 0;
    position: relative;
    z-index: 1;
}

.wheel-controls-container .spin-btn,
.wheel-controls-container .google-link,
.wheel-controls-container .other-search-link {
    flex: 1;
    text-align: center;
    max-width: 200px; /* để nút đều nhau */
}

/* Nút SPIN */
.spin-btn-container {
    flex: 1;
    text-align: left;
}

.spin-btn-container .spin-btn {
	margin-top:15px;
    padding: 12px 25px;
    font-size: 16px;
    max-width: 250px;
}

/* Link Google */
.google-link-container {
    flex: 1;
    text-align: right;
}

.google-link-container .google-link {
    padding: 5px 1px;
    font-size: 1rem;
    max-width: 300px;
    display: inline-block;
    text-align: center;
}

/* Phần kết quả combination */
.combination-result-container {
    width: 100%;
    max-width: 800px;
    margin: 20px auto 0;
    text-align: center;
}

.combination-result-container .game-result {
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* Responsive cho mobile */
@media (max-width: 768px) {
    .wheel-controls-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .spin-btn-container,
    .google-link-container {
        text-align: center;
        width: 100%;
    }
    
    .spin-btn-container .spin-btn,
    .google-link-container .google-link {
        max-width: 100%;
        width: 100%;
    }
	
	.other-search-engines-container {
        flex-direction: column; /* Stack buttons vertically on small screens */
        gap: 8px;
    }

    .other-search-link {
        width: 100%; /* Make buttons full width on small screens */
        box-sizing: border-box; /* Include padding and border in the element's total width and height */
    }
}


.color-legend {
    scroll-behavior: smooth; /* Áp dụng cho tất cả cuộn, không chỉ animate */
}

/* Tạo thêm không gian cho highlight */
.legend-row.highlight {
    margin-top: 5px;
    margin-bottom: 5px;
}


.watch-video-btn {
  background: #53bfcc;
  color: #ffffff;
  padding: 10px 22px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 20px;
}

.watch-video-btn:hover {
  background: #eb4f5c;
}

/* ---------------------------------
   Responsive
--------------------------------- */
@media (max-width: 768px) {
  .rank-game-container {
    padding: 20px;
  }

  .spin-btn,
  .google-link,
  .watch-video-btn {
    width: 100%;
    text-align: center;
  }
}