/* Base styles - keeping your original structure */

/* Hide mobile-only headers and voting sections by default */
.strip-header-left,
.strip-header-right,
.voting-section-left,
.voting-section-right {
    display: none;
}

.container-panel {
  width: 100%;
  max-width: 1164px;
  margin: 0 auto;
  padding: 0px;
  border-radius: 10px;
  border-color: #F6D55C;
  border-width: 1px;
  border-style: solid;
  background-color: #F6D55C;
}

.page-container {
  width: 100%;
  max-width: 1164px;
  margin: 0 auto;
  padding-left: 0px;
  padding-right: 0px;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  min-height: 100vh; 
}

.about-container {
  border-radius: 10px;
  padding: 0px;
  color: white;
  font-family: Arial, sans-serif; 
  font-size: 1.2em;
  flex: 1 1 100%;
  box-sizing: border-box; 
}

/* Responsive image styling */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.zebra {
    margin: 8px;
}

.chinwag {
    margin: 8px auto;
    background-color: #555555;
    text-align: center;
    padding: 0px;
    overflow-y: auto; 
    height: 650px;
    max-width: 1164px;
    width: 100%;
    box-sizing: border-box;
    isolation: isolate; 
    contain: layout style;
}

.flex-container {
    font-size: 12px;
    font-weight: bold;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    min-height: 60px;
}

.flex-container .column {
    background: #555555;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0px;
}

.flex-container .column.left-align {
    justify-content: flex-start;
    width: 120px;
    flex-shrink: 0;
}

.flex-container .column.right-align {
    justify-content: flex-end;
    width: 120px;
    flex-shrink: 0;
}

.flex-container .column.center {
    flex: 1;
    justify-content: center;
    font-size: 2.0em;
    color: #F6D55C;
    text-align: center;
}


.MainSelectDiv {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0px;
    width: 100%;
    max-width: 1164px;
    margin: 0 auto 10px;
    background: #555555;
    border-radius: 10px;
    text-align: center;
    font-size: 1.2em;
    box-sizing: border-box;
}


.strip-container {
    width: 100%;
    max-width: 1164px;
    margin: 0 auto;
    background: #555555;
    border-radius: 10px;
    overflow: hidden;
}

.strip-header {
    color: white;
    padding-top: 0px;
    padding-bottom:8px;
    display: grid;
    grid-template-columns: 1fr 10px 1fr;
    gap: 0;
    text-align: center;
    font-family: CCLegendaryLegerdemain-Reg, Arial, sans-serif; 
}

.strip-content {
    display: grid;
    grid-template-columns: 1fr 10px 1fr;
    gap: 0;
}

.strip-content .panel-container:first-child {
    justify-self: end;
}

.strip-content .panel-container:last-child {
    justify-self: start;
}

.panel-container {
    background: #777;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0px;
    box-sizing: border-box;
}


.panel-image {
    width: 100%;
    max-width: 560px;
    height: 420px;
    background: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 18px;
    border-radius: 4px;
    box-sizing: border-box;
}

.artist-credit {
    background: #777;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    color:white; 
    font-family: CCLegendaryLegerdemain-Reg, Arial, sans-serif; 
    font-size:small;
    padding-top:8px;
    padding-bottom:8px;
}

.artist-credit .flip-icon-container {
    position: absolute;
    right: 10px;
    display: flex;
    justify-content: flex-end;
}

.center-divider {
    width: 10px;
}

.center-divider-yellow {
    width: 10px;
    background:#F6D55C;
}

.voting-section {
    display: grid;
    grid-template-columns: 1fr 10px 1fr;
    gap: 0;
    padding: 0px;
    align-items: center;
}

.vote-controls {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 20px;
    position: relative;
}

.vote-button {
    background: #F6D55C;
    border: none;
    padding: 8px 16px;
    margin: 8px 0;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    color: #333;
}

.vote-button:hover {
    background: #e6c347;
}

.status-circles {
    display: flex;
    gap: 8px;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.greenCircle {
    background: #4CAF50;
}

.yellowCircle {
    background: #FFC107;
}

.yellowCircle:hover {
    background: #FFD54F;
}

.comment-icon {
    background: #F6D55C;
    color: #333;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
}

.comment-icon:hover {
    background: #e6c347;
}

.logo-container {
    width: 80px;
    height: 40px;
    background: #555555;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: left;
    color: #ccc;
    font-size: 10px;
}

.content-strip {
    overflow: hidden;
    height: 420px;
    width: 560px;
    color:#FFFFFF;
    font-size:1.25em;
    cursor:pointer;
    perspective: 1000px;
    margin: 0 auto;
}

.card-strip {
    position: relative;
    height: 420px;
    width: 560px;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    -webkit-transition-property: transform;
    -webkit-transition-duration: 1.5s;
    transition-property: transform;
    transition-duration: 1.5s;
}

.card-strip.flipped {
    -webkit-transform: rotateY(180deg);
    transform: rotateY(180deg);
}

.side {
    position: absolute;
    height: inherit;
    width: inherit;
    -webkit-backface-visibility: hidden;   
    backface-visibility: hidden;
    border-radius: 4px;
}

.side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-strip-back-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  width: 100%;
  background: #444;
  color: white;
  padding: 8px;
  box-sizing: border-box;
  height: 420px;  
}

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

.profile-image-back {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid #fff;
  object-fit: cover;
  flex-shrink: 0;
}

.back-title {
  flex: 1;
  text-align: center;
  font-family: CCLegendaryLegerdemain-Reg, Arial, sans-serif;
  font-size: 18px;
  color: white;
}

.description-text {
  flex: 1;
  overflow-y: auto;
  font-family: CCLegendaryLegerdemain-Reg, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  color: white;
  padding: 6px;
  border: 1px solid #666;
  border-radius: 4px;
  text-align: left;
}


/* iPad Portrait */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .container-panel {
        margin: 0 15px !important;
        width: calc(100% - 30px) !important;
        max-width: none !important;
    }
    .MainSelectDiv {
        width: 100% !important;
        max-width: none !important;
    }
    .strip-container {
        width: 100% !important;
        max-width: none !important;
    }
    .strip-content {
        grid-template-columns: 1fr 10px 1fr !important;
        gap: 0 !important;
        padding: 0 0px !important;
        width: 100% !important;
        max-width: none !important;
    }
    .strip-header {
        grid-template-columns: 1fr 10px 1fr !important;
        padding: 5 5px !important;
        width: 100% !important;
        max-width: none !important;
    }
    .voting-section {
        grid-template-columns: 1fr 10px 1fr !important;
        padding: 0 5px !important;
        width: 100% !important;
        max-width: none !important;
    }
    .panel-container {
        width: 100% !important;
        max-width: none !important;
    }
    .panel-image {
        width: 373px !important;
        max-width: none !important;
        height: 280px !important;
    }
    .content-strip {
        width: 100% !important;
        height: 280px !important;
        max-width: none !important;
        min-width: 100% !important;
    }
    .card-strip {
        width: 100% !important;
        height: 280px !important;
        max-width: none !important;
        min-width: 100% !important;
    }
    .side {
        width: 100% !important;
        height: 280px !important;
        max-width: none !important;
    }

	.card-strip-back-content {
	  display: flex;
	  flex-direction: column;
	  justify-content: flex-start;
	  align-items: stretch;
	  width: 100%;
	  background: #444;
	  color: white;
	  padding: 8px;
	  box-sizing: border-box;
      height: 280px !important;
	}
    
	.description-text {
	  flex: 1;
	  overflow-y: auto;
	  font-family: CCLegendaryLegerdemain-Reg, Arial, sans-serif;
	  font-size: 16px;
	  line-height: 1.4;
	  color: white;
	  padding: 6px;
	  border: 1px solid #666;
	  border-radius: 4px;
	  text-align: left;
	}
    
    .description {
        font-size: 0.85em;
        padding: 5px 0;
    }
}


/* iPad Landscape */
@media screen and (min-width: 1025px) and (max-width: 1366px) and (orientation: landscape) {
    .container-panel {
        margin: 0 20px;
        width: calc(100% - 40px);
    }
    .description {
        font-size: 0.9em;
        padding: 6px 0;
    }
}


/* Large tablets in landscape */
@media screen and (min-width: 835px) and (max-width: 1024px) and (orientation: landscape) {
    .container-panel {
        margin: 0 20px;
        width: calc(100% - 40px);
    }
    .about-container {
        font-size: 1.1em;
    }
    .flex-container .column.center {
        font-size: 1.8em;
    }
    .panel-image {
        height: 280px !important;
    }
    .strip-content,
    .strip-header,
    .voting-section {
        padding: 0 15px !important;
    }
    .description {
        font-size: 0.9em;
        padding: 6px 0;
    }
}




/* Mobile Portrait */
@media screen and (max-width: 767px) and (orientation: portrait) {
    .container-panel {
        margin: 0 8px;
        width: calc(100% - 16px);
        max-width: none;
    }
    .page-container {
        padding: 8px;
    }
    .about-container {
        font-size: 1.0em;
        padding: 8px;
    }
    .flex-container {
        flex-direction: column;
        gap: 0px;
        padding: 8px;
        text-align: center;
    }
    .flex-container .column.left-align,
    .flex-container .column.right-align {
        display: none !important;
    }
    .flex-container .column.center {
        width: 100%;
        justify-content: center;
        font-size: 1.5em;
        order: 0;
        margin-bottom: 12px;
    }
    .strip-header,
    .voting-section {
        display: none !important;
    }
    .strip-header-left,
    .strip-header-right {
        display: block !important;
        color: white;
        padding: 12px 8px 8px 8px;
        text-align: center;
        font-family: CCLegendaryLegerdemain-Reg, Arial, sans-serif;
        background: #555555;
        border-radius: 10px 10px 0 0;
        margin-top: 12px;
        font-size: 1.1em;
    }
    .strip-header-left {
        margin-top: 0;
    }
    .voting-section-left,
    .voting-section-right {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        text-align: center !important;
        padding: 12px 8px !important;
        background: #555555;
        border-radius: 0 0 10px 10px;
        margin-bottom: 12px;
    }
    .voting-section-right {
        margin-bottom: 0;
    }
    .strip-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 0px !important;
        padding: 0 8px 20px 8px !important;
    }
    .strip-content .center-divider {
        display: none !important;
    }
    .strip-content .panel-container:first-child {
        margin-left: auto !important;
        margin-right: auto !important;
        border-radius: 0 0 0 0;
        margin-bottom: 0px;
    }
    .strip-content .panel-container:last-child {
        margin-left: auto !important;
        margin-right: auto !important;
        border-radius: 0 0 0 0;
    }
    .panel-container {
        width: 100% !important;
    }
    .panel-image {
        width: 333px !important;
        max-width: none !important;
        height: 250px !important;
    }
    .content-strip {
        width: 100% !important;
        height: 250px !important;
        max-width: none !important;
    }
    .card-strip {
        width: 100% !important;
        height: 250px !important;
        max-width: none !important;
    }
    .side {
        width: 100% !important;
        height: 250px !important;
        max-width: none !important;
    }
    
	.card-strip-back-content {
	  display: flex;
	  flex-direction: column;
	  justify-content: flex-start;
	  align-items: stretch;
	  width: 100%;
	  background: #444;
	  color: white;
	  padding: 8px;
	  box-sizing: border-box;
      height: 250px !important;
	}
    
    .description {
        font-size: 0.8em;
        padding: 4px 0;
    }
}

/* Very small phones */
@media screen and (max-width: 430px) and (orientation: portrait) {
    .container-panel {
        margin: 0 5px;
        width: calc(100% - 10px);
    }
    .about-container {
        font-size: 0.9em !important;
        padding: 8px !important;
    }
    .flex-container .column.center {
        font-size: 1.2em !important;
    }
    .panel-image {
        height: 200px !important;
    }
    .vote-button {
        padding: 6px 12px;
        font-size: 12px;
    }
    .description {
        font-size: 0.75em;
        padding: 4px 0;
    }
}

/* ========================================
   iPhone LANDSCAPE - FINAL CORRECTED VERSION
   ======================================== */

/* ALL iPhone Landscape (most important - comes last to override everything) */
@media screen and (max-height: 430px) and (orientation: landscape) {
    
    /* FORCE remove ALL max-width constraints on every container */
    body {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .page-container {
        width: 100vw !important;
        max-width: 100vw !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .container-panel {
        margin: 0 2px !important;
        width: calc(100vw - 4px) !important;
        max-width: 100vw !important;
        padding: 2px !important;
    }
    
    .MainSelectDiv {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    #BeforeStripDiv {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    #AfterStripDiv {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .strip-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    
    /* Header bar */
    .flex-container {
        min-height: 40px !important;
        padding: 2px 4px !important;
        width: 100% !important;
    }
    
    .flex-container .column.center {
        font-size: 1.1em !important;
    }
    
    .flex-container .column.left-align,
    .flex-container .column.right-align {
        width: 90px !important;
    }
    
    .logo-container {
        width: 70px !important;
        height: 35px !important;
    }
    
    .comment-icon {
        padding: 6px 10px !important;
        font-size: 11px !important;
    }
    
    /* Strip header */
    .strip-header {
        padding: 2px 4px 3px 4px !important;
        font-size: 0.9em !important;
        width: 100% !important;
    }
    
    /* Main content grid - CRITICAL */
    .strip-content {
        display: grid !important;
        grid-template-columns: 1fr 6px 1fr !important;
        gap: 0 !important;
        align-items: stretch !important;
        padding: 0 4px 4px 4px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .center-divider {
        width: 6px !important;
    }
    
    /* Panel containers - make them use full width */
    .strip-content .panel-container:first-child,
    .strip-content .panel-container:last-child {
        justify-self: stretch !important;
    }
    
    .panel-container {
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
    }
    
    /* Panel images - maximize space - remove ALL constraints */
    .panel-image {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        height: 340px !important;
        flex-shrink: 0 !important;
    }
    
    .panel-container .panel-image {
        width: 100% !important;
        max-width: none !important;
    }
    
    .content-strip {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        height: 340px !important;
        margin: 0 !important;
    }
    
    .panel-image .content-strip {
        width: 100% !important;
        max-width: none !important;
    }
    
    .card-strip {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        height: 340px !important;
    }
    
    .content-strip .card-strip {
        width: 100% !important;
        max-width: none !important;
    }
    
    .side {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        height: 340px !important;
    }
    
    .side img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    
    /* Back content */
    .card-strip-back-content {
        height: 340px !important;
        padding: 6px !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .back-header {
        margin-bottom: 4px !important;
        gap: 6px !important;
        display: flex !important;
        align-items: center !important;
        flex-shrink: 0 !important;
    }
    
    .card-strip-back-content .back-header {
        margin-bottom: 4px !important;
    }
    
    .profile-image-back {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        max-width: 40px !important;
        max-height: 40px !important;
        border-width: 1px !important;
        flex-shrink: 0 !important;
    }
    
    .back-header .profile-image-back {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        max-width: 40px !important;
        max-height: 40px !important;
    }
    
    .card-strip-back-content .profile-image-back {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        max-width: 40px !important;
        max-height: 40px !important;
    }
    
    .back-title {
        font-size: 13px !important;
        flex: 1 !important;
        min-width: 0 !important;
        word-wrap: break-word !important;
    }
    
    .description-text {
        font-size: 14px !important;
        line-height: 1.3 !important;
        padding: 4px !important;
        flex: 1 !important;
        overflow-y: auto !important;
    }
    
    /* Artist credit - keep at bottom */
    .artist-credit {
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 0 !important;
        flex-shrink: 0 !important;
        padding: 4px 6px !important;
        font-size: 11px !important;
    }
    
    .artist-credit .flip-icon-container img {
        width: 22px !important;
        height: 34px !important;
    }
    
    /* Voting section */
    .voting-section {
        padding: 2px 4px 4px 4px !important;
        grid-template-columns: 1fr 6px 1fr !important;
        width: 100% !important;
    }
    
    .vote-button {
        padding: 4px 10px !important;
        font-size: 11px !important;
        margin: 4px 0 !important;
    }
    
    .vote-controls {
        padding: 0 10px !important;
    }
    
    .status-circles {
        gap: 5px !important;
    }
    
    .circle {
        width: 9px !important;
        height: 9px !important;
    }
}

/* Larger iPhone Landscape (Pro Max models) - More specific */
@media screen and (min-width: 844px) and (max-height: 430px) and (orientation: landscape) {
    
    #BeforeStripDiv {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    #AfterStripDiv {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .strip-content .panel-container:first-child,
    .strip-content .panel-container:last-child {
        justify-self: stretch !important;
    }
    
    .flex-container {
        min-height: 45px !important;
    }
    
    .flex-container .column.center {
        font-size: 1.2em !important;
    }
    
    .strip-header {
        font-size: 0.95em !important;
    }
    
    .panel-image {
        height: 360px !important;
        max-width: none !important;
        min-width: 0 !important;
    }
    
    .panel-container .panel-image {
        width: 100% !important;
        max-width: none !important;
    }
    
    .content-strip {
        height: 360px !important;
        margin: 0 !important;
        max-width: none !important;
        min-width: 0 !important;
    }
    
    .panel-image .content-strip {
        width: 100% !important;
        max-width: none !important;
    }
    
    .card-strip {
        height: 360px !important;
        max-width: none !important;
        min-width: 0 !important;
    }
    
    .content-strip .card-strip {
        width: 100% !important;
        max-width: none !important;
    }
    
    .side {
        height: 360px !important;
        max-width: none !important;
        min-width: 0 !important;
    }
    
    .side img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    
    .side {
        height: 320px !important;
    }
    
    .card-strip-back-content {
        height: 360px !important;
        padding: 6px !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .back-header {
        margin-bottom: 4px !important;
        gap: 6px !important;
        display: flex !important;
        align-items: center !important;
        flex-shrink: 0 !important;
    }
    
    .card-strip-back-content .back-header {
        margin-bottom: 4px !important;
    }
    
    .profile-image-back {
        width: 45px !important;
        height: 45px !important;
        min-width: 45px !important;
        min-height: 45px !important;
        max-width: 45px !important;
        max-height: 45px !important;
        border-width: 1px !important;
        flex-shrink: 0 !important;
    }
    
    .back-header .profile-image-back {
        width: 45px !important;
        height: 45px !important;
        min-width: 45px !important;
        min-height: 45px !important;
        max-width: 45px !important;
        max-height: 45px !important;
    }
    
    .card-strip-back-content .profile-image-back {
        width: 45px !important;
        height: 45px !important;
        min-width: 45px !important;
        min-height: 45px !important;
        max-width: 45px !important;
        max-height: 45px !important;
    }
    
    .back-title {
        font-size: 14px !important;
        flex: 1 !important;
        min-width: 0 !important;
        word-wrap: break-word !important;
    }
    
    .description-text {
        font-size: 15px !important;
        line-height: 1.3 !important;
        padding: 5px !important;
        flex: 1 !important;
        overflow-y: auto !important;
    }
    
    .artist-credit {
        font-size: 12px !important;
        padding: 5px 8px !important;
    }
    
    .vote-button {
        font-size: 12px !important;
        padding: 5px 12px !important;
    }
    
    .description-text {
        font-size: 11px !important;
    }
}